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 { UMB_BLOCK_WORKSPACE_CONTEXT } from './index.js';
import { css, customElement, html, state } from '../../../../external/lit/index.js';
import { UmbLitElement } from '../../../core/lit-element/index.js';
let UmbBlockWorkspaceEditorElement = class UmbBlockWorkspaceEditorElement extends UmbLitElement {
    constructor() {
        super();
        this._headline = '';
        this.consumeContext(UMB_BLOCK_WORKSPACE_CONTEXT, (context) => {
            if (context) {
                this.observe(context.name, (name) => {
                    this._headline = this.localize.string(name);
                }, 'observeOwnerContentElementTypeName');
            }
            else {
                this.removeUmbControllerByAlias('observeOwnerContentElementTypeName');
            }
        });
    }
    render() {
        return html `<umb-workspace-editor headline=${this._headline}></umb-workspace-editor>`;
    }
    static { this.styles = [
        css `
			:host {
				display: block;
				width: 100%;
				height: 100%;
			}
		`,
    ]; }
};
__decorate([
    state()
], UmbBlockWorkspaceEditorElement.prototype, "_headline", void 0);
UmbBlockWorkspaceEditorElement = __decorate([
    customElement('umb-block-workspace-editor')
], UmbBlockWorkspaceEditorElement);
export { UmbBlockWorkspaceEditorElement };
export default UmbBlockWorkspaceEditorElement;
