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 { html, customElement, property, css, unsafeHTML } from '../../../../../external/lit/index.js';
import { UmbTextStyles } from '../../../style/index.js';
import { UmbLitElement, umbFocus } from '../../../lit-element/index.js';
let UmbInfoModalElement = class UmbInfoModalElement extends UmbLitElement {
    _handleClose() {
        this.modalContext?.reject();
    }
    render() {
        return html `
			<uui-dialog-layout class="uui-text" .headline=${this.localize.string(this.data?.headline) ?? null}>
				${typeof this.data?.content === 'string'
            ? unsafeHTML(this.localize.string(this.data?.content))
            : this.data?.content}

				<uui-button
					slot="actions"
					id="close"
					label=${this.localize.term('general_close')}
					@click=${this._handleClose}
					${umbFocus()}></uui-button>
			</uui-dialog-layout>
		`;
    }
    static { this.styles = [
        UmbTextStyles,
        css `
			uui-dialog-layout {
				max-inline-size: 60ch;
			}
		`,
    ]; }
};
__decorate([
    property({ attribute: false })
], UmbInfoModalElement.prototype, "modalContext", void 0);
__decorate([
    property({ type: Object, attribute: false })
], UmbInfoModalElement.prototype, "data", void 0);
UmbInfoModalElement = __decorate([
    customElement('umb-info-modal')
], UmbInfoModalElement);
export { UmbInfoModalElement };
export default UmbInfoModalElement;
