import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_client__ from "@tachybase/client";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
const mySchemaSetting = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.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, __WEBPACK_EXTERNAL_MODULE__tachybase_client__.useSchemaSettingsRender)('MySchemaSetting');
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponentOptions, {
        components: {
            Input: __WEBPACK_EXTERNAL_MODULE_antd__.Input,
            FormItem: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.FormItem
        },
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
            style: {
                width: 100
            },
            children: render()
        })
    });
};
const app = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Application({
    schemaSettings: [
        mySchemaSetting
    ],
    providers: [
        DemoRoot
    ],
    plugins: [
        __WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponentPlugin
    ]
});
const built_type_rslib_entry_ = app.getRootComponent();
export { built_type_rslib_entry_ as default };
