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_myInitializer = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaInitializer({
    name: 'myInitializer',
    designable: true,
    title: 'Button Text',
    items: [
        {
            name: 'demo1',
            Component: ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                    children: "myInitializer content"
                })
        },
        {
            name: 'demo2',
            Component: ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                    children: "myInitializer content 2"
                })
        }
    ]
});
const Root = ()=>{
    const { render } = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_client__.useSchemaInitializerRender)('myInitializer');
    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.schemaInitializerManager.add(basic_rslib_entry_myInitializer);
        this.app.router.add('root', {
            path: '/',
            Component: Root
        });
    }
}
class MyPlugin2 extends __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Plugin {
    async load() {
        const myInitializer = this.app.schemaInitializerManager.get('myInitializer');
        myInitializer.add('demo3', {
            Component: ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                    children: "myInitializer content3"
                })
        });
        myInitializer.remove('demo2');
    }
}
const app = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Application({
    router: {
        type: 'memory',
        initialEntries: [
            '/'
        ]
    },
    plugins: [
        MyPlugin,
        MyPlugin2
    ]
});
const basic_rslib_entry_ = app.getRootComponent();
export { basic_rslib_entry_ as default };
