import { jsx } from "react/jsx-runtime";
import "react";
import { ADMIN_SETTINGS_PATH } from "../../application/index.mjs";
import { Plugin } from "../../application/Plugin.mjs";
import { BlockTemplatesPane } from "../../schema-templates/index.mjs";
import { AdminSettingsLayout, SettingsCenterContext } from "../setting-layout/AdminSettings.mjs";
import { SettingsCenterDropdown } from "../setting-layout/SettingsCenterDropdown.mjs";
import { SystemSettingsPane } from "../system-settings/index.mjs";
import { PluginManager } from "./PluginManager.mjs";
class PMPlugin extends Plugin {
    async load() {
        this.addComponents();
        this.addRoutes();
        this.addSettings();
    }
    addSettings() {
        this.app.systemSettingsManager.add('business-components.ui-schema-storage', {
            title: '{{t("Block templates")}}',
            icon: 'LayoutOutlined',
            Component: BlockTemplatesPane,
            aclSnippet: 'pm.ui-schema-storage.block-templates'
        });
        this.app.systemSettingsManager.add('system-settings', {
            icon: 'SettingOutlined',
            title: '{{t("System settings")}}',
            Component: SystemSettingsPane,
            aclSnippet: 'pm.system-settings.system-settings',
            sort: -100
        });
        this.app.systemSettingsManager.add('system-services.plugin-manager', {
            icon: 'ApiOutlined',
            title: '{{t("Plugin manager")}}',
            Component: PluginManager,
            aclSnippet: 'pm',
            sort: -90
        });
    }
    addComponents() {
        this.app.addComponents({
            SettingsCenterDropdown: SettingsCenterDropdown
        });
    }
    addRoutes() {
        this.app.router.add('admin-settings', {
            path: ADMIN_SETTINGS_PATH,
            element: /*#__PURE__*/ jsx(AdminSettingsLayout, {})
        });
    }
}
const pm = PMPlugin;
export { AdminSettingsLayout, PMPlugin, PluginManager, SettingsCenterContext, SettingsCenterDropdown, pm as default };
