'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-75aef097.js');
const assetsManager = require('./assets-manager-089e91b1.js');
require('./mer-animated-dots-78490ca4.js');
require('lit');
require('lit/directives/when.js');
require('lit/directives/if-defined.js');
const locale = require('./locale-ff30a5f3.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 = assetsManager.getIconPath({
    category: "system",
    name: "folder",
    colorType: "on-primary"
});
const GxIdeStartingTemplate = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        _GxIdeStartingTemplate_chShortcutsEl.set(this, void 0);
        _GxIdeStartingTemplate_shortcutsSrc.set(this, index.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.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 (index.h(index.Host, { class: "widget spacing-body" }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeStartingTemplate_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeStartingTemplate_chShortcutsEl, el, "f")) }), index.h("section", { class: "section" }, index.h("header", { class: "header dialog-header dialog-header-with-border" }, index.h("div", { class: "field field-block" }, index.h("label", { class: "label", htmlFor: "first-name" }, this._componentLocale.main.firstName), index.h("ch-edit", { class: "input", id: "first-name", value: this.firstName }))), index.h("div", { class: "main" }, "The main content here"), index.h("footer", { class: "footer dialog-footer dialog-footer-with-border" }, index.h("div", { class: "buttons-spacer" }, index.h("button", {
            // #cancel
            class: "button-secondary", id: "button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeStartingTemplate_cancelButtonClickedHandler, "f"), part: "button-cancel"
        }, this._componentLocale.footer.btnCancel), index.h("button", {
            // #create
            class: "button-primary button-icon-and-text", id: "button-create", onClick: __classPrivateFieldGet(this, _GxIdeStartingTemplate_saveButtonClickedHandler, "f"), part: "button-create"
        }, index.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 index.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;

exports.gx_ide_starting_template = GxIdeStartingTemplate;

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