var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { UmbTextStyles } from '../../../core/style/index.js';
import { css, html, customElement, property, state } from '../../../../external/lit/index.js';
import { UmbLitElement } from '../../../core/lit-element/index.js';
let UmbWorkspacePackageElement = class UmbWorkspacePackageElement extends UmbLitElement {
    connectedCallback() {
        super.connectedCallback();
        if (this.entityId)
            this._getPackageData();
    }
    _getPackageData() {
        //TODO
        this._package = {
            id: this.entityId,
            name: 'A created package',
        };
    }
    _navigateBack() {
        window.history.pushState({}, '', 'section/packages/view/installed');
    }
    _renderHeader() {
        return html `<div class="header" slot="header">
			<uui-button compact @click="${this._navigateBack}">
				<uui-icon name="icon-arrow-left"></uui-icon>
				<span data-mark="input:workspace-name">${this._package.name ?? 'Package name'}</span>
			</uui-button>
		</div>`;
    }
    render() {
        return html `<umb-workspace-editor> ${this._renderHeader()} </umb-workspace-editor> `;
    }
    static { this.styles = [
        UmbTextStyles,
        css `
			.header {
				display: flex;
				font-size: var(--uui-type-h5-size);
			}
		`,
    ]; }
};
__decorate([
    property()
], UmbWorkspacePackageElement.prototype, "entityId", void 0);
__decorate([
    state()
], UmbWorkspacePackageElement.prototype, "_package", void 0);
UmbWorkspacePackageElement = __decorate([
    customElement('umb-workspace-package')
], UmbWorkspacePackageElement);
export { UmbWorkspacePackageElement };
export { UmbWorkspacePackageElement as element };
