// #region Imports
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;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Slottable } from '../../../Behaviors/Slottable';
import { TextFormattable } from '../../../Behaviors/TextFormattable';
import { Themeable } from '../../../Behaviors/Themeable';
import { addInheritanceConsumerController } from '../../../Controllers/InheritanceConsumerController';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { dialogHeaderElementTemplate } from './DialogHeaderElementTemplate';
import { DialogHeaderSubTextElement } from './DialogHeaderSubTextElement';
import { DialogHeaderTextElement } from './DialogHeaderTextElement';
import { DIALOG_INHERITANCE_CONTEXT } from './DialogInheritanceContext';
import { dialogHeaderElementCosmopolitanStyle } from './Themes/DialogHeaderElement.Cosmopolitan';
import { dialogHeaderElementJoyStyle } from './Themes/DialogHeaderElement.Joy';
import { dialogHeaderElementMemphisStyle } from './Themes/DialogHeaderElement.Memphis';
// #endregion
/**
 * DialogHeader - The header section within a dialog containing title and sub-title.
 *
 * @description
 * Renders the dialog title and optional subtitle. Text and subText must be set via
 * JavaScript since they are @Property (not HTML attributes). Alternatively, place
 * `mosaik-dialog-header-text` and `mosaik-dialog-header-sub-text` children directly.
 * Place this element in the `header` slot of `mosaik-dialog`.
 *
 * @name DialogHeader
 * @element mosaik-dialog-header
 * @category Overlays
 *
 * @slot header - The header slot.
 * @slot prefix - The prefix slot.
 * @slot subHeader - The subHeader slot.
 * @slot suffix - The suffix slot.
 *
 * @csspart heading - The heading part.
 *
 * @cssprop {String} --dialog-header-font-family - The header font family CSS custom property.
 * @cssprop {String} --dialog-header-font-letter-spacing - The header font letter spacing CSS custom property.
 * @cssprop {String} --dialog-header-font-line-height - The header font line height CSS custom property.
 * @cssprop {String} --dialog-header-font-size - The header font size CSS custom property.
 * @cssprop {String} --dialog-header-font-text-decoration - The header font text decoration CSS custom property.
 * @cssprop {String} --dialog-header-font-text-transform - The header font text transform CSS custom property.
 * @cssprop {String} --dialog-header-font-weight - The header font weight CSS custom property.
 * @cssprop {String} --dialog-header-gap - The header gap CSS custom property.
 * @cssprop {String} --dialog-header-padding-bottom - The header padding bottom CSS custom property.
 * @cssprop {String} --dialog-header-padding-left - The header padding left CSS custom property.
 * @cssprop {String} --dialog-header-padding-right - The header padding right CSS custom property.
 * @cssprop {String} --dialog-header-padding-top - The header padding top CSS custom property.
 * @cssprop {String} --dialog-header-shadow - The header shadow CSS custom property.
 * @cssprop {String} --dialog-header-shadow-blur - The header shadow blur CSS custom property.
 * @cssprop {String} --dialog-header-shadow-color - The header shadow color CSS custom property.
 * @cssprop {String} --dialog-header-shadow-offset-x - The header shadow offset x CSS custom property.
 * @cssprop {String} --dialog-header-shadow-offset-y - The header shadow offset y CSS custom property.
 * @cssprop {String} --dialog-header-shadow-spread - The header shadow spread CSS custom property.
 * @cssprop {String} --dialog-header-transition-duration - The header transition duration CSS custom property.
 * @cssprop {String} --dialog-header-transition-mode - The header transition mode CSS custom property.
 * @cssprop {String} --dialog-header-transition-property - The header transition property CSS custom property.
 * @cssprop {String} --dialog-header-translate - The header translate CSS custom property.
 *
 * @dependency mosaik-dialog-header-sub-text - The Dialog Header Sub Text element.
 * @dependency mosaik-dialog-header-text - The Dialog Header Text element.
 *
 * @example
 * Dialog header with slotted title elements:
 * ```html
 * <mosaik-dialog-header slot="header">
 *   <mosaik-dialog-header-text slot="header"></mosaik-dialog-header-text>
 *   <mosaik-dialog-header-sub-text slot="subHeader"></mosaik-dialog-header-sub-text>
 * </mosaik-dialog-header>
 * ```
 *
 * @public
 */
let DialogHeaderElement = class DialogHeaderElement extends Themeable(TextFormattable(Slottable(CustomElement))) {
    // #region Fields
    /**
     * Controller for inheriting properties from parent DialogElement.
     * Note: DialogElement only provides closeable state, not header/subHeader properties.
     */
    _inheritance = addInheritanceConsumerController(this, {
        context: DIALOG_INHERITANCE_CONTEXT
    });
    _text;
    _subText;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._text = '';
        this._subText = '';
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-dialog-header';
    }
    /**
     * Gets or sets the `text` property.
     *
     * @public
     */
    get text() {
        return this._text;
    }
    set text(value) {
        if (this._text !== value) {
            this._text = value;
            this.requestUpdate('text');
        }
    }
    /**
     * Gets or sets the `subText` property.
     *
     * @public
     */
    get subText() {
        return this._subText;
    }
    set subText(value) {
        if (this._subText !== value) {
            this._subText = value;
            this.requestUpdate('subText');
        }
    }
    // #endregion
    // #region Methods
    onApplyTemplate() {
        super.onApplyTemplate();
    }
};
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], DialogHeaderElement.prototype, "text", null);
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], DialogHeaderElement.prototype, "subText", null);
DialogHeaderElement = __decorate([
    Component({
        selector: 'mosaik-dialog-header',
        template: dialogHeaderElementTemplate,
        themes: {
            joy: dialogHeaderElementJoyStyle,
            memphis: dialogHeaderElementMemphisStyle,
            cosmopolitan: dialogHeaderElementCosmopolitanStyle
        },
        host: {
            slot: 'header'
        },
        imports: [
            DialogHeaderTextElement,
            DialogHeaderSubTextElement
        ]
    }),
    __metadata("design:paramtypes", [])
], DialogHeaderElement);
export { DialogHeaderElement };
//# sourceMappingURL=DialogHeaderElement.js.map