"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: ()=>built_type_rslib_entry_
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const client_namespaceObject = require("@tachybase/client");
const external_antd_namespaceObject = require("antd");
const mySchemaSetting = new client_namespaceObject.SchemaSettings({
    name: 'MySchemaSetting',
    items: [
        {
            name: 'demo1',
            type: 'item',
            componentProps: {
                title: 'Text',
                onClick () {
                    alert('Text');
                }
            }
        },
        {
            name: 'demo2',
            type: 'subMenu',
            componentProps: {
                title: 'Sub Menu'
            },
            children: [
                {
                    name: 'demo3',
                    type: 'switch',
                    componentProps: {
                        title: 'Switch1'
                    }
                },
                {
                    name: 'demo4',
                    type: 'switch',
                    componentProps: {
                        title: 'Switch2'
                    }
                }
            ]
        },
        {
            name: 'demo5',
            type: 'divider'
        },
        {
            name: 'demo6',
            type: 'itemGroup',
            componentProps: {
                title: 'Group'
            },
            children: [
                {
                    name: 'demo7',
                    type: 'select',
                    componentProps: {
                        title: 'Select1',
                        options: [
                            {
                                label: 'a',
                                value: 'a'
                            },
                            {
                                label: 'b',
                                value: 'b'
                            }
                        ]
                    }
                },
                {
                    name: 'demo8',
                    type: 'cascader',
                    componentProps: {
                        title: 'Cascader',
                        options: [
                            {
                                label: 'zhejiang',
                                value: 'Zhejiang',
                                children: [
                                    {
                                        value: 'hangzhou',
                                        label: 'Hangzhou'
                                    }
                                ]
                            }
                        ]
                    }
                }
            ]
        },
        {
            name: 'demo9',
            type: 'modal',
            componentProps: {
                title: 'Modal',
                schema: {
                    type: 'object',
                    title: 'Edit button',
                    properties: {
                        title: {
                            'x-decorator': 'FormItem',
                            'x-component': 'Input',
                            title: 'Button title',
                            default: 'aaa',
                            'x-component-props': {}
                        }
                    }
                },
                onSubmit () {
                    alert(123);
                }
            }
        }
    ]
});
const DemoRoot = ()=>{
    const { render } = (0, client_namespaceObject.useSchemaSettingsRender)('MySchemaSetting');
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponentOptions, {
        components: {
            Input: external_antd_namespaceObject.Input,
            FormItem: client_namespaceObject.FormItem
        },
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
            style: {
                width: 100
            },
            children: render()
        })
    });
};
const app = new client_namespaceObject.Application({
    schemaSettings: [
        mySchemaSetting
    ],
    providers: [
        DemoRoot
    ],
    plugins: [
        client_namespaceObject.SchemaComponentPlugin
    ]
});
const built_type_rslib_entry_ = app.getRootComponent();
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
});
