import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import VarReferencePicker from '../_base/components/variable/var-reference-picker' import OutputVars, { VarItem } from '../_base/components/output-vars' import OptionCard from '../_base/components/option-card' import Split from '../_base/components/split' import useConfig from './use-config' import SubVariablePicker from './components/sub-variable-picker' import { type ListFilterNodeType, OrderBy } from './types' import LimitConfig from './components/limit-config' import FilterCondition from './components/filter-condition' import Field from '@/app/components/workflow/nodes/_base/components/field' import { type NodePanelProps } from '@/app/components/workflow/types' import Switch from '@/app/components/base/switch' import ExtractInput from '@/app/components/workflow/nodes/list-operator/components/extract-input' const i18nPrefix = 'workflow.nodes.listFilter' const Panel: FC> = ({ id, data, }) => { const { t } = useTranslation() const { readOnly, inputs, itemVarType, itemVarTypeShowName, hasSubVariable, handleVarChanges, filterVar, handleFilterEnabledChange, handleFilterChange, handleExtractsEnabledChange, handleExtractsChange, handleLimitChange, handleOrderByEnabledChange, handleOrderByKeyChange, handleOrderByTypeChange, } = useConfig(id, data) return (
} > {inputs.filter_by?.enabled ? ( ) : null} } > {inputs.extract_by?.enabled ? (
{hasSubVariable && (
)}
) : null}
} > {inputs.order_by?.enabled ? (
{hasSubVariable && (
)}
) : null}
<>
) } export default React.memo(Panel)