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__tachybase_schema__ from "@tachybase/schema";
const addActionButton = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaInitializer({
    name: 'addActionButton',
    designable: true,
    title: 'Configure actions',
    style: {
        marginLeft: 8
    },
    items: [
        {
            type: 'itemGroup',
            title: 'Enable actions',
            name: 'enableActions',
            children: [
                {
                    name: 'action1',
                    title: '{{t("Action 1")}}',
                    Component: 'ActionInitializer',
                    schema: {
                        title: 'Action 1',
                        'x-component': 'Action',
                        'x-action': 'action1',
                        'x-align': 'left'
                    }
                },
                {
                    name: 'action2',
                    title: '{{t("Action 2")}}',
                    Component: 'ActionInitializer',
                    schema: {
                        title: 'Action 2',
                        'x-component': 'Action',
                        'x-action': 'action2',
                        'x-align': 'right'
                    }
                }
            ]
        }
    ]
});
const schema = {
    type: 'object',
    properties: {
        actions: {
            type: 'void',
            'x-component': 'ActionBar',
            'x-initializer': 'addActionButton',
            'x-uid': (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)(),
            properties: {
                a1: {
                    title: 'Action 1',
                    'x-component': 'Action',
                    'x-action': 'action1',
                    'x-align': 'left'
                }
            }
        }
    }
};
const Root = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponentProvider, {
        designable: true,
        components: {
            ActionInitializer: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.ActionInitializer,
            ActionBar: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.ActionBar,
            Action: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Action
        },
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponent, {
            schema: schema
        })
    });
class MyPlugin extends __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Plugin {
    async load() {
        this.app.schemaInitializerManager.add(addActionButton);
        this.app.router.add('root', {
            path: '/',
            Component: Root
        });
    }
}
const app = new __WEBPACK_EXTERNAL_MODULE__tachybase_client__.Application({
    router: {
        type: 'memory',
        initialEntries: [
            '/'
        ]
    },
    plugins: [
        MyPlugin
    ]
});
const demo6_rslib_entry_ = app.getRootComponent();
export { demo6_rslib_entry_ as default };
