import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import { DateFilter } from '../Date/index.js';
import { NumberFilter } from '../Number/index.js';
import { RelationshipFilter } from '../Relationship/index.js';
import { Select } from '../Select/index.js';
import { Text } from '../Text/index.js';
export const DefaultFilter = ({ booleanSelect, disabled, filterOptions, internalField, onChange, operator, options, value })=>{
    if (booleanSelect || [
        'radio',
        'select'
    ].includes(internalField?.field?.type)) {
        return /*#__PURE__*/ _jsxDEV(Select, {
            disabled: disabled,
            field: internalField.field,
            isClearable: !booleanSelect,
            onChange: onChange,
            operator: operator,
            options: options,
            value: value
        }, void 0, false, {
            fileName: "src/elements/WhereBuilder/Condition/DefaultFilter/index.tsx",
            lineNumber: 42,
            columnNumber: 7
        }, this);
    }
    switch(internalField?.field?.type){
        case 'date':
            {
                return /*#__PURE__*/ _jsxDEV(DateFilter, {
                    disabled: disabled,
                    field: internalField.field,
                    onChange: onChange,
                    operator: operator,
                    value: value
                }, void 0, false, {
                    fileName: "src/elements/WhereBuilder/Condition/DefaultFilter/index.tsx",
                    lineNumber: 57,
                    columnNumber: 9
                }, this);
            }
        case 'number':
            {
                return /*#__PURE__*/ _jsxDEV(NumberFilter, {
                    disabled: disabled,
                    field: internalField.field,
                    onChange: onChange,
                    operator: operator,
                    value: value
                }, void 0, false, {
                    fileName: "src/elements/WhereBuilder/Condition/DefaultFilter/index.tsx",
                    lineNumber: 69,
                    columnNumber: 9
                }, this);
            }
        case 'relationship':
            {
                return /*#__PURE__*/ _jsxDEV(RelationshipFilter, {
                    disabled: disabled,
                    field: internalField.field,
                    filterOptions: filterOptions ?? {},
                    onChange: onChange,
                    operator: operator,
                    value: value
                }, void 0, false, {
                    fileName: "src/elements/WhereBuilder/Condition/DefaultFilter/index.tsx",
                    lineNumber: 81,
                    columnNumber: 9
                }, this);
            }
        case 'upload':
            {
                return /*#__PURE__*/ _jsxDEV(RelationshipFilter, {
                    disabled: disabled,
                    field: internalField.field,
                    filterOptions: filterOptions ?? {},
                    onChange: onChange,
                    operator: operator,
                    value: value
                }, void 0, false, {
                    fileName: "src/elements/WhereBuilder/Condition/DefaultFilter/index.tsx",
                    lineNumber: 94,
                    columnNumber: 9
                }, this);
            }
        default:
            {
                return /*#__PURE__*/ _jsxDEV(Text, {
                    disabled: disabled,
                    field: internalField?.field,
                    onChange: onChange,
                    operator: operator,
                    value: value
                }, void 0, false, {
                    fileName: "src/elements/WhereBuilder/Condition/DefaultFilter/index.tsx",
                    lineNumber: 107,
                    columnNumber: 9
                }, this);
            }
    }
};

//# sourceMappingURL=index.js.map