// #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 { Appearanceable } from '../../../Behaviors/Appearanceable';
import { Fitable } from '../../../Behaviors/Fitable';
import { TextFormattable } from '../../../Behaviors/TextFormattable';
import { Variantable } from '../../../Behaviors/Variantable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { TextElement } from '../../Primitives/Text/TextElement';
import { toolbarElementTemplate } from './ToolbarElementTemplate';
import { toolbarElementJoyStyle } from './Themes/ToolbarElement.Joy';
import { toolbarElementMemphisStyle } from './Themes/ToolbarElement.Memphis';
import { toolbarElementCosmopolitanStyle } from './Themes/ToolbarElement.Cosmopolitan';
// #endregion
/**
 * Toolbar - A horizontal container for organizing actions, controls, and navigation elements.
 *
 * Provides structured layout for application toolbars with dedicated slots for start/end content,
 * titles, and main actions. Supports flexible content arrangement and consistent styling.
 * Essential for application headers, action bars, and control panels.
 *
 * @name ToolbarElement
 * @element mosaik-toolbar
 * @category Grouping
 *
 * @slot start - Leading content area for navigation or primary actions
 * @slot - Default content slot for main toolbar controls
 * @slot title - Primary toolbar title or heading
 * @slot subTitle - Secondary title or subtitle text
 * @slot end - Trailing content area for secondary actions or controls
 *
 * @csspart root - Root container for the entire toolbar
 * @csspart main - Main content section container
 * @csspart title - Title section container
 * @csspart subTitle - Subtitle section container
 *
 * @cssprop --toolbar-background-color - Background color of the toolbar
 * @cssprop --toolbar-height - Height of the toolbar container
 * @cssprop --toolbar-padding - Internal padding for toolbar content
 * @cssprop --toolbar-gap - Spacing between toolbar sections
 * @cssprop --toolbar-border-color - Border color for toolbar edges
 * @cssprop --toolbar-title-font-size - Font size for toolbar title
 * @cssprop --toolbar-title-font-weight - Font weight for toolbar title
 *
 * @dependency TextElement - For rendering title and subtitle text
 *
 * @example
 * ```html
 * <!-- Application header toolbar -->
 * <mosaik-toolbar>
 *   <mosaik-button slot="start" appearance="ghost">
 *     <mosaik-icon data="menu-icon"></mosaik-icon>
 *   </mosaik-button>
 *   <h1 slot="title">Application Name</h1>
 *   <div slot="end">
 *     <mosaik-button appearance="ghost">Settings</mosaik-button>
 *     <mosaik-avatar slot="end" src="user.jpg"></mosaik-avatar>
 *   </div>
 * </mosaik-toolbar>
 *
 * <!-- Document toolbar with actions -->
 * <mosaik-toolbar>
 *   <div slot="start">
 *     <mosaik-button>Save</mosaik-button>
 *     <mosaik-button>Export</mosaik-button>
 *   </div>
 *   <span slot="title">Document.pdf</span>
 *   <span slot="subTitle">Last modified: Today</span>
 *   <div slot="end">
 *     <mosaik-button appearance="danger">Delete</mosaik-button>
 *   </div>
 * </mosaik-toolbar>
 *
 * <!-- Simple toolbar with centered title -->
 * <mosaik-toolbar>
 *   <mosaik-button slot="start">Back</mosaik-button>
 *   <h2 slot="title">Page Settings</h2>
 *   <mosaik-button slot="end">Done</mosaik-button>
 * </mosaik-toolbar>
 * ```
 *
 * @public
 */
let ToolbarElement = class ToolbarElement extends Themeable(Variantable(Appearanceable(Fitable(TextFormattable(CustomElement))))) {
    // #region Fields
    _title;
    _subTitle;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._title = '';
        this._subTitle = '';
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-toolbar';
    }
    /**
     * 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 `subTitle` property.
     *
     * @public
     * @attr
     */
    get subTitle() {
        return this._subTitle;
    }
    set subTitle(value) {
        if (this._subTitle !== value) {
            this._subTitle = value;
            this.requestUpdate('subTitle');
        }
    }
};
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ToolbarElement.prototype, "title", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ToolbarElement.prototype, "subTitle", null);
ToolbarElement = __decorate([
    Component({
        selector: 'mosaik-toolbar',
        template: toolbarElementTemplate,
        themes: {
            joy: toolbarElementJoyStyle,
            memphis: toolbarElementMemphisStyle,
            cosmopolitan: toolbarElementCosmopolitanStyle
        },
        imports: [
            TextElement
        ]
    }),
    __metadata("design:paramtypes", [])
], ToolbarElement);
export { ToolbarElement };
//# sourceMappingURL=ToolbarElement.js.map