// #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.
 * @slot action - The action slot.
 *
 * @csspart root - The root part.
 * @csspart icon - The icon part.
 * @csspart title - The title part.
 * @csspart action - The action part.
 *
 * @cssprop {String} --titlebar-font-family - The font family.
 * @cssprop {String} --titlebar-font-size - The font size.
 * @cssprop {String} --titlebar-font-line-height - The font line height.
 * @cssprop {String} --titlebar-font-weight - The font weight.
 * @cssprop {String} --titlebar-font-letter-spacing - The font letter spacing.
 * @cssprop {String} --titlebar-font-text-decoration - The font text decoration.
 * @cssprop {String} --titlebar-font-text-transform - The font text transform.
 *
 * @dependency {TextElement} mosaik-text - The text element.
 * @dependency {IconElement} mosaik-icon - The icon element.
 * @dependency {ButtonElement} mosaik-button - The button element.
 *
 * @example
 * ```html
 * <mosaik-titlebar title="Title"></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 `{@link is}` property.
     * The `{@link 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