import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_client__ from "@tachybase/client";
const basic_rslib_entry_mySchemaSetting = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaSettings({
    name: 'MySchemaSetting',
    items: [
        {
            name: 'demo1',
            type: 'item',
            componentProps: {
                title: 'DEMO1',
                onClick () {
                    alert('DEMO1');
                }
            }
        },
        {
            name: 'demo2',
            Component: ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaSettingsItem, {
                    title: "DEMO2",
                    onClick: ()=>alert('DEMO2')
                })
        }
    ]
});
const Root = ()=>{
    const { render } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_client__.useSchemaSettingsRender)('MySchemaSetting');
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
        children: render()
    });
};
class MyPlugin extends __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Plugin {
    async load() {
        this.app.schemaSettingsManager.add(basic_rslib_entry_mySchemaSetting);
    }
}
class MyPlugin2 extends __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Plugin {
    async load() {
        const mySchemaSetting = this.app.schemaSettingsManager.get('MySchemaSetting');
        const Demo3 = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaSettingsItem, {
                title: "DEMO3",
                onClick: ()=>alert('DEMO3')
            });
        mySchemaSetting.add('demo3', {
            Component: Demo3
        });
        mySchemaSetting.remove('demo2');
    }
}
const app = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Application({
    plugins: [
        MyPlugin,
        MyPlugin2
    ],
    providers: [
        Root
    ]
});
const basic_rslib_entry_ = app.getRootComponent();
export { basic_rslib_entry_ as default };
