import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE__context_mjs__ from "./context.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__FilterGroup_mjs__ from "./FilterGroup.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__FilterItem_mjs__ from "./FilterItem.mjs";
const FilterItems = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)((props)=>{
    var _field_value;
    const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
        children: null == field ? void 0 : null === (_field_value = field.value) || void 0 === _field_value ? void 0 : _field_value.filter(Boolean).map((item, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__context_mjs__.RemoveConditionContext.Provider, {
                value: ()=>field.remove(index),
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_schema__.ObjectFieldComponent, {
                    name: index,
                    component: [
                        item.$and || item.$or ? __WEBPACK_EXTERNAL_MODULE__FilterGroup_mjs__.FilterGroup : __WEBPACK_EXTERNAL_MODULE__FilterItem_mjs__.FilterItem
                    ]
                })
            }, index))
    });
}, {
    displayName: 'FilterItems'
});
export { FilterItems };
