"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
(()=>{
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    default: ()=>demo5_rslib_entry_
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const client_namespaceObject = require("@tachybase/client");
const options = [
    {
        name: 'name',
        title: 'Name',
        operators: [
            {
                label: 'eq',
                value: '$eq'
            },
            {
                label: 'ne',
                value: '$ne'
            }
        ],
        schema: {
            type: 'string',
            title: 'Name',
            'x-component': 'Input'
        }
    },
    {
        name: 'age',
        title: 'Age',
        operators: [
            {
                label: 'in',
                value: '$in'
            },
            {
                label: 'not',
                value: '$not'
            }
        ],
        schema: {
            type: 'string',
            title: 'Age',
            'x-component': 'InputNumber'
        }
    },
    {
        name: 'tags',
        title: 'Tags',
        schema: {
            title: 'Tags'
        },
        children: [
            {
                name: 'slug',
                title: 'Slug',
                operators: [
                    {
                        label: 'in',
                        value: '$in'
                    },
                    {
                        label: 'not',
                        value: '$not'
                    }
                ],
                schema: {
                    title: 'Slug',
                    type: 'string',
                    'x-component': 'Input'
                }
            },
            {
                name: 'title',
                title: 'Title',
                operators: [
                    {
                        label: 'eq',
                        value: '$eq'
                    },
                    {
                        label: 'ne',
                        value: '$ne'
                    }
                ],
                schema: {
                    title: 'Title',
                    type: 'string',
                    'x-component': 'Input'
                }
            }
        ]
    }
];
const defaultValue = {
    $or: [
        {
            name: {
                $ne: null
            }
        },
        {
            'tags.title': {
                $eq: 'aaa'
            }
        }
    ]
};
const schema = {
    type: 'void',
    properties: {
        demo: {
            type: 'object',
            title: 'Filter',
            enum: '{{ options }}',
            default: defaultValue,
            'x-component': 'FilterAction',
            'x-component-props': {}
        }
    }
};
const demo5_rslib_entry_ = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponentProvider, {
        components: {
            FilterAction: client_namespaceObject.FilterAction,
            Filter: client_namespaceObject.Filter,
            Input: client_namespaceObject.Input
        },
        scope: {
            options
        },
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponent, {
            schema: schema
        })
    });
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
