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 '../../style/index.js';
import { css, html, customElement, property } from '../../../../external/lit/index.js';
import { umbDestroyOnDisconnect, UmbLitElement } from '../../lit-element/index.js';
let UmbWorkspaceModalElement = class UmbWorkspaceModalElement extends UmbLitElement {
    get data() {
        return this._data;
    }
    set data(value) {
        this._data = value;
        if (value?.inheritValidationLook) {
            // Do nothing.
        }
        else {
            const elementStyle = this.style;
            elementStyle.setProperty('--uui-color-invalid', 'var(--uui-color-danger)');
            elementStyle.setProperty('--uui-color-invalid-emphasis', 'var(--uui-color-danger-emphasis)');
            elementStyle.setProperty('--uui-color-invalid-standalone', 'var(--uui-color-danger-standalone)');
            elementStyle.setProperty('--uui-color-invalid-contrast', 'var(--uui-color-danger-contrast)');
        }
    }
    /**
     * TODO: Consider if this binding and events integration is the right for communicating back the modal handler. Or if we should go with some Context API. like a Modal Context API.
     *
     */
    render() {
        return this.data
            ? html `<umb-workspace .entityType=${this.data.entityType} ${umbDestroyOnDisconnect()}></umb-workspace>`
            : '';
    }
    static { this.styles = [
        UmbTextStyles,
        css `
			:host {
				display: block;
				height: 100%;
			}
		`,
    ]; }
};
__decorate([
    property({ attribute: false })
], UmbWorkspaceModalElement.prototype, "data", null);
UmbWorkspaceModalElement = __decorate([
    customElement('umb-workspace-modal')
], UmbWorkspaceModalElement);
export { UmbWorkspaceModalElement };
export default UmbWorkspaceModalElement;
