// #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 { Themeable } from '../../../../Controls/Behaviors/Themeable';
import { TextFormattable } from '../../../Behaviors/TextFormattable';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { ButtonElement } from '../../Buttons/Button/ButtonElement';
import { IconElement } from '../../Media/Icon/IconElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { titleBarElementJoyStyle } from './Themes/TitleBarElement.Joy';
import { titleBarElementMemphisStyle } from './Themes/TitleBarElement.Memphis';
import { titleBarElementTemplate } from './TitleBarElementTemplate';
import { titleBarElementCosmopolitanStyle } from './Themes/TitleBarElement.Cosmopolitan';
// #endregion
/**
 * Title Bar - A title bar is a graphical control element and part of a window decoration.
 *
 * @description
 * The title bar is typically used to display the title of the window, the icon of the application, and the window's control buttons.
 *
 * @name Title Bar
 * @element mosaik-titlebar
 * @category Grouping
 *
 * @slot icon - The icon slot.
 * @slot title - The title slot.
 *
 * @csspart action - The action part.
 * @csspart root - The root part.
 * @csspart title - The title part.
 *
 * @cssprop {String} --title-bar-font-family - The bar font family CSS custom property.
 * @cssprop {String} --title-bar-font-letter-spacing - The bar font letter spacing CSS custom property.
 * @cssprop {String} --title-bar-font-line-height - The bar font line height CSS custom property.
 * @cssprop {String} --title-bar-font-size - The bar font size CSS custom property.
 * @cssprop {String} --title-bar-font-text-decoration - The bar font text decoration CSS custom property.
 * @cssprop {String} --title-bar-font-text-transform - The bar font text transform CSS custom property.
 * @cssprop {String} --title-bar-font-weight - The bar font weight CSS custom property.
 * @cssprop {String} --title-bar-gap - The bar gap CSS custom property.
 * @cssprop {String} --title-bar-padding-bottom - The bar padding bottom CSS custom property.
 * @cssprop {String} --title-bar-padding-left - The bar padding left CSS custom property.
 * @cssprop {String} --title-bar-padding-right - The bar padding right CSS custom property.
 * @cssprop {String} --title-bar-padding-top - The bar padding top CSS custom property.
 * @cssprop {String} --title-bar-shadow - The bar shadow CSS custom property.
 * @cssprop {String} --title-bar-shadow-blur - The bar shadow blur CSS custom property.
 * @cssprop {String} --title-bar-shadow-color - The bar shadow color CSS custom property.
 * @cssprop {String} --title-bar-shadow-offset-x - The bar shadow offset x CSS custom property.
 * @cssprop {String} --title-bar-shadow-offset-y - The bar shadow offset y CSS custom property.
 * @cssprop {String} --title-bar-shadow-spread - The bar shadow spread CSS custom property.
 * @cssprop {String} --title-bar-transition-duration - The bar transition duration CSS custom property.
 * @cssprop {String} --title-bar-transition-mode - The bar transition mode CSS custom property.
 * @cssprop {String} --title-bar-transition-property - The bar transition property CSS custom property.
 * @cssprop {String} --title-bar-translate - The bar translate CSS custom property.
 *
 * @dependency {ButtonElement} mosaik-button - The button element.
 * @dependency {IconElement} mosaik-icon - The icon element.
 * @dependency {TextElement} mosaik-text - The text element.
 *
 * @example
 * Title bar with title slot:
 * ```html
 * <mosaik-titlebar>
 *   <span slot="title">My Application</span>
 * </mosaik-titlebar>
 * ```
 *
 * @example
 * Title bar with custom content in the title slot:
 * ```html
 * <mosaik-titlebar>
 *   <span slot="title">My Application</span>
 *   <mosaik-button slot="action"></mosaik-button>
 * </mosaik-titlebar>
 * ```
 *
 * @public
 */
let TitleBarElement = class TitleBarElement extends Themeable(TextFormattable(CustomElement)) {
    // #region Fields
    _title;
    _icon;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._title = '';
        this._icon = '';
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-titlebar';
    }
    /**
     * Gets or sets the `title` property.
     *
     * @public
     * @override
     */
    get title() {
        return this._title;
    }
    set title(value) {
        if (this._title !== value) {
            this._title = value;
            this.requestUpdate('title');
        }
    }
    /**
     * Gets or sets the `icon` property.
     *
     * @public
     */
    get icon() {
        return this._icon;
    }
    set icon(value) {
        if (this._icon !== value) {
            this._icon = value;
            this.requestUpdate('icon');
        }
    }
};
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TitleBarElement.prototype, "title", null);
__decorate([
    Property({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TitleBarElement.prototype, "icon", null);
TitleBarElement = __decorate([
    Component({
        selector: 'mosaik-titlebar',
        template: titleBarElementTemplate,
        themes: {
            joy: titleBarElementJoyStyle,
            memphis: titleBarElementMemphisStyle,
            cosmopolitan: titleBarElementCosmopolitanStyle
        },
        imports: [
            TextElement,
            IconElement,
            ButtonElement
        ]
    }),
    __metadata("design:paramtypes", [])
], TitleBarElement);
export { TitleBarElement };
//# sourceMappingURL=TitleBarElement.js.map