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 { customElement, html, property, state, when } from '../../../external/lit/index.js';
import { UmbLitElement } from '../../core/lit-element/index.js';
/**
 * @element umb-property-editor-ui-label
 */
let UmbPropertyEditorUILabelElement = class UmbPropertyEditorUILabelElement extends UmbLitElement {
    constructor() {
        super(...arguments);
        this.value = '';
    }
    set config(config) {
        this._labelTemplate = config?.getValueByAlias('labelTemplate');
    }
    render() {
        return when(this._labelTemplate?.length, () => html `<umb-ufm-render inline .markdown=${this._labelTemplate} .value=${this.value}></umb-ufm-render>`, () => html `${this.value ?? ''}`);
    }
};
__decorate([
    state()
], UmbPropertyEditorUILabelElement.prototype, "_labelTemplate", void 0);
__decorate([
    property()
], UmbPropertyEditorUILabelElement.prototype, "value", void 0);
__decorate([
    property({ attribute: false })
], UmbPropertyEditorUILabelElement.prototype, "config", null);
UmbPropertyEditorUILabelElement = __decorate([
    customElement('umb-property-editor-ui-label')
], UmbPropertyEditorUILabelElement);
export { UmbPropertyEditorUILabelElement };
export default UmbPropertyEditorUILabelElement;
