import { r as registerInstance, g as getAssetPath, h, H as Host, a as getElement } from './index-b153bfd0.js';
import { g as getIconPath } from './assets-manager-7d6fc08f.js';
import './mer-animated-dots-7cbae6ef.js';
import 'lit';
import 'lit/directives/when.js';
import 'lit/directives/if-defined.js';
import { L as Locale } from './locale-e5107fad.js';

const startingTemplateCss = "button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content}.section{display:contents}.main{overflow:auto;display:flex;align-items:center;justify-content:center}";

// This is a starting template. Do not edit this file directly.
// Dupicate it and modify the new file as needed.
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
    if (kind === "m")
        throw new TypeError("Private method is not writable");
    if (kind === "a" && !f)
        throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
        throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var _GxIdeStartingTemplate_chShortcutsEl, _GxIdeStartingTemplate_shortcutsSrc, _GxIdeStartingTemplate_cancelButtonClickedHandler, _GxIdeStartingTemplate_saveButtonClickedHandler;
const CSS_BUNDLES = [
    // Use only the bundles that are needed for this component.
    "resets/box-sizing",
    "components/edit",
    "components/button",
    "components/icon",
    "utils/layout",
    "utils/form",
    "utils/typography",
    "utils/spacing",
    "chameleon/scrollbar"
];
const SYSTEM_ICON = getIconPath({
    category: "system",
    name: "folder",
    colorType: "on-primary"
});
const GxIdeStartingTemplate = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        _GxIdeStartingTemplate_chShortcutsEl.set(this, void 0);
        _GxIdeStartingTemplate_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/new-kb/shortcuts.json`));
        _GxIdeStartingTemplate_cancelButtonClickedHandler.set(this, () => {
            this.cancelCallback();
        });
        _GxIdeStartingTemplate_saveButtonClickedHandler.set(this, () => {
            this.saveCallback();
        });
        this.myStateVariable = undefined;
        this.firstName = undefined;
        this.cancelCallback = undefined;
        this.saveCallback = undefined;
    }
    firstNameChanged(newValue) {
        console.log("First name changed:", newValue);
    }
    async componentWillLoad() {
        this._componentLocale = await Locale.getComponentStrings(this.el);
    }
    componentDidLoad() {
        // Here you can do any additional setup after the component has been rendered.
    }
    /**
     * Suspends or reactivates the shortcuts
     */
    async suspendShortcuts(suspendShortcuts) {
        if (suspendShortcuts) {
            __classPrivateFieldGet(this, _GxIdeStartingTemplate_chShortcutsEl, "f").suspend = true;
        }
        else {
            __classPrivateFieldGet(this, _GxIdeStartingTemplate_chShortcutsEl, "f").suspend = false;
        }
    }
    render() {
        return (h(Host, { class: "widget spacing-body" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeStartingTemplate_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeStartingTemplate_chShortcutsEl, el, "f")) }), h("section", { class: "section" }, h("header", { class: "header dialog-header dialog-header-with-border" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "first-name" }, this._componentLocale.main.firstName), h("ch-edit", { class: "input", id: "first-name", value: this.firstName }))), h("div", { class: "main" }, "The main content here"), h("footer", { class: "footer dialog-footer dialog-footer-with-border" }, h("div", { class: "buttons-spacer" }, h("button", {
            // #cancel
            class: "button-secondary", id: "button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeStartingTemplate_cancelButtonClickedHandler, "f"), part: "button-cancel"
        }, this._componentLocale.footer.btnCancel), h("button", {
            // #create
            class: "button-primary button-icon-and-text", id: "button-create", onClick: __classPrivateFieldGet(this, _GxIdeStartingTemplate_saveButtonClickedHandler, "f"), part: "button-create"
        }, h("ch-image", { class: "icon-m", src: SYSTEM_ICON }), this._componentLocale.footer.btnSave))))));
    }
    static get assetsDirs() { return ["gx-ide-assets/starting-template"]; }
    get el() { return getElement(this); }
    static get watchers() { return {
        "firstName": ["firstNameChanged"]
    }; }
};
_GxIdeStartingTemplate_chShortcutsEl = new WeakMap(), _GxIdeStartingTemplate_shortcutsSrc = new WeakMap(), _GxIdeStartingTemplate_cancelButtonClickedHandler = new WeakMap(), _GxIdeStartingTemplate_saveButtonClickedHandler = new WeakMap();
GxIdeStartingTemplate.style = startingTemplateCss;

export { GxIdeStartingTemplate as gx_ide_starting_template };

//# sourceMappingURL=gx-ide-starting-template.entry.js.map