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 './index.js';
let SzDemoViewSettings = (() => {
    let _classDecorators = [customElement('sz-demo-view-settings')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    var SzDemoViewSettings = 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);
            SzDemoViewSettings = _classThis = _classDescriptor.value;
            if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        appui = null;
        async onActivate(context) {
            this.appui = context.appui;
            // Settings doesn't need content tabs, but we set up the secondary menu
            this.appui.setSecondaryMenu({
                heading: 'Settings',
                groups: [
                    {
                        name: 'Categories',
                        items: [
                            { key: 'General', iconName: 'lucide:Settings', action: () => { console.log('General settings'); } },
                            { key: 'Network', iconName: 'lucide:Network', action: () => { console.log('Network settings'); } },
                            { key: 'Security', iconName: 'lucide:Shield', action: () => { console.log('Security settings'); } },
                            { key: 'Certificates', iconName: 'lucide:FileBadge', action: () => { console.log('Certificate settings'); } },
                        ],
                    },
                    {
                        name: 'Actions',
                        items: [
                            { type: 'action', key: 'Export Config', iconName: 'lucide:Download', action: () => { console.log('Export config'); } },
                            { type: 'action', key: 'Import Config', iconName: 'lucide:Upload', action: () => { console.log('Import config'); } },
                            { type: 'action', variant: 'danger', key: 'Reset to Default', iconName: 'lucide:RotateCcw', confirmMessage: 'Are you sure you want to reset all settings to default?', action: () => { console.log('Reset settings'); } },
                        ],
                    },
                ],
            });
        }
        onDeactivate() {
            // Cleanup if needed
        }
        demoSettings = {
            darkMode: true,
            cloudflareToken: '',
            cloudflareZoneId: '',
            autoRenewCerts: true,
            renewalThreshold: 30,
            acmeEmail: 'admin@serve.zone',
            httpPort: 80,
            httpsPort: 443,
            forceHttps: true,
        };
        static styles = [
            cssManager.defaultStyles,
            css `
      :host {
        display: block;
        padding: 24px;
        height: 100%;
        overflow-y: auto;
        box-sizing: border-box;
      }

      .page-header {
        margin-bottom: 24px;
      }

      .page-title {
        font-size: 24px;
        font-weight: 700;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
        margin: 0 0 8px 0;
      }

      .page-subtitle {
        font-size: 14px;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
        margin: 0;
      }

      .settings-container {
        max-width: 800px;
      }
    `,
        ];
        render() {
            return html `
      <div class="page-header">
        <h1 class="page-title">Settings</h1>
        <p class="page-subtitle">Configure your onebox instance</p>
      </div>

      <div class="settings-container">
        <sz-settings-view
          .settings=${this.demoSettings}
          currentUser="admin"
          @setting-change=${(e) => console.log('Setting change:', e.detail)}
          @change-password=${(e) => console.log('Change password:', e.detail)}
          @reset=${() => console.log('Reset settings')}
          @save=${(e) => console.log('Save settings:', e.detail)}
        ></sz-settings-view>
      </div>
    `;
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzDemoViewSettings = _classThis;
})();
export { SzDemoViewSettings };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otZGVtby12aWV3LXNldHRpbmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfd2ViL2VsZW1lbnRzL3N6LWRlbW8tdmlldy1zZXR0aW5ncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUNMLFdBQVcsRUFDWCxhQUFhLEVBQ2IsSUFBSSxFQUNKLEdBQUcsRUFDSCxVQUFVLEdBRVgsTUFBTSw2QkFBNkIsQ0FBQztBQUVyQyxPQUFPLFlBQVksQ0FBQztJQVNQLGtCQUFrQjs0QkFEOUIsYUFBYSxDQUFDLHVCQUF1QixDQUFDOzs7O3NCQUNDLFdBQVc7a0NBQW5CLFNBQVEsV0FBVzs7OztZQUFuRCw2S0FtR0M7Ozs7UUFsR1MsS0FBSyxHQUFxQixJQUFJLENBQUM7UUFFdkMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxPQUE2QztZQUM1RCxJQUFJLENBQUMsS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