var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};
import { DeesElement, customElement, html, css, cssManager, } from '@design.estate/dees-element';
import '@design.estate/dees-catalog';
import '../elements/index.js';
let SzDemoAppShell = (() => {
    let _classDecorators = [customElement('sz-demo-app-shell')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    var SzDemoAppShell = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            SzDemoAppShell = _classThis = _classDescriptor.value;
            if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        static styles = [
            cssManager.defaultStyles,
            css `
      :host {
        display: block;
        height: 100%;
        width: 100%;
      }

      dees-appui {
        height: 100%;
        width: 100%;
      }
    `,
        ];
        render() {
            return html `
      <dees-appui></dees-appui>
    `;
        }
        async firstUpdated() {
            const appui = this.shadowRoot?.querySelector('dees-appui');
            if (!appui)
                return;
            // Configure the application shell
            appui.configure({
                branding: {
                    logoIcon: 'lucide:Box',
                    logoText: 'serve.zone',
                },
                appBar: {
                    showSearch: true,
                    breadcrumbs: 'serve.zone',
                    menuItems: [
                        {
                            name: 'File',
                            action: async () => { },
                            submenu: [
                                { name: 'New Service', shortcut: 'Cmd+N', action: async () => { console.log('New Service'); } },
                                { name: 'Import Configuration', action: async () => { console.log('Import'); } },
                                { name: 'Export Configuration', action: async () => { console.log('Export'); } },
                                { divider: true },
                                { name: 'Preferences', shortcut: 'Cmd+,', action: async () => { appui.navigateToView('settings'); } },
                            ],
                        },
                        {
                            name: 'View',
                            action: async () => { },
                            submenu: [
                                { name: 'Dashboard', shortcut: 'Cmd+1', action: async () => { appui.navigateToView('dashboard'); } },
                                { name: 'Services', shortcut: 'Cmd+2', action: async () => { appui.navigateToView('services'); } },
                                { name: 'Network', shortcut: 'Cmd+3', action: async () => { appui.navigateToView('network'); } },
                                { divider: true },
                                { name: 'Activity Log', shortcut: 'Cmd+Shift+A', action: async () => { appui.toggleActivityLog(); } },
                                { name: 'Toggle Sidebar', shortcut: 'Cmd+B', action: async () => { appui.setMainMenuCollapsed(!appui.mainmenuCollapsed); } },
                            ],
                        },
                        {
                            name: 'Services',
                            action: async () => { },
                            submenu: [
                                { name: 'Deploy New Service', action: async () => { console.log('Deploy'); } },
                                { name: 'Start All', action: async () => { console.log('Start all'); } },
                                { name: 'Stop All', action: async () => { console.log('Stop all'); } },
                                { divider: true },
                                { name: 'Garbage Collect', action: async () => { console.log('GC'); } },
                            ],
                        },
                        {
                            name: 'Help',
                            action: async () => { },
                            submenu: [
                                { name: 'Documentation', action: async () => { window.open('https://docs.serve.zone', '_blank'); } },
                                { name: 'Release Notes', action: async () => { console.log('Release notes'); } },
                                { divider: true },
                                { name: 'About serve.zone', action: async () => { console.log('About'); } },
                            ],
                        },
                    ],
                },
                views: [
                    {
                        id: 'dashboard',
                        name: 'Dashboard',
                        iconName: 'lucide:LayoutDashboard',
                        content: 'sz-demo-view-dashboard',
                    },
                    {
                        id: 'services',
                        name: 'Services',
                        iconName: 'lucide:Server',
                        content: 'sz-demo-view-services',
                    },
                    {
                        id: 'network',
                        name: 'Network',
                        iconName: 'lucide:Network',
                        content: 'sz-demo-view-network',
                    },
                    {
                        id: 'registries',
                        name: 'Registries',
                        iconName: 'lucide:Archive',
                        content: 'sz-demo-view-registries',
                    },
                    {
                        id: 'tokens',
                        name: 'Tokens',
                        iconName: 'lucide:Key',
                        content: 'sz-demo-view-tokens',
                    },
                    {
                        id: 'mta',
                        name: 'Email / MTA',
                        iconName: 'lucide:Mail',
                        content: 'sz-demo-view-mta',
                    },
                    {
                        id: 'routes',
                        name: 'Routes',
                        iconName: 'lucide:Route',
                        content: 'sz-demo-view-routes',
                    },
                    {
                        id: 'settings',
                        name: 'Settings',
                        iconName: 'lucide:Settings',
                        content: 'sz-demo-view-settings',
                    },
                ],
                mainMenu: {
                    sections: [
                        {
                            name: 'Overview',
                            views: ['dashboard'],
                        },
                        {
                            name: 'Infrastructure',
                            views: ['services', 'network', 'registries', 'mta', 'routes'],
                        },
                        {
                            name: 'Administration',
                            views: ['tokens', 'settings'],
                        },
                    ],
                },
                defaultView: 'dashboard',
                onViewChange: (viewId, view) => {
                    console.log('View changed to:', viewId, view);
                },
            });
            // Set user profile
            appui.setUser({
                name: 'Admin User',
                email: 'admin@serve.zone',
                status: 'online',
            });
            // Set profile menu items
            appui.setProfileMenuItems([
                { name: 'Profile', iconName: 'lucide:User', action: async () => { console.log('Profile'); } },
                { name: 'Preferences', iconName: 'lucide:SlidersHorizontal', action: async () => { console.log('Preferences'); } },
                { divider: true },
                { name: 'Sign Out', iconName: 'lucide:LogOut', action: async () => { console.log('Sign Out'); } },
            ]);
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzDemoAppShell = _classThis;
})();
export { SzDemoAppShell };
//# sourceMappingURL=data:application/json;base64, 