'use client' import type { FC } from 'react' import type { PluginDetail } from '@/app/components/plugins/types' import { Checkbox } from '@langgenius/dify-ui/checkbox' import * as React from 'react' import Icon from '@/app/components/plugins/card/base/card-icon' import { MARKETPLACE_API_PREFIX } from '@/config' import { useGetLanguage } from '@/context/i18n' import { renderI18nObject } from '@/i18n-config' type Props = Readonly<{ payload: PluginDetail isChecked?: boolean onCheckChange: () => void }> const ToolItem: FC = ({ payload, isChecked, onCheckChange, }) => { const language = useGetLanguage() const { plugin_id, declaration } = payload const { label, author: org } = declaration return (
{renderI18nObject(label, language)}
{org}
onCheckChange()} className="shrink-0" aria-label={renderI18nObject(label, language)} />
) } export default React.memo(ToolItem)