// #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 { Disableable } from '../../../Behaviors/Disableable';
import { Fitable } from '../../../Behaviors/Fitable';
import { Orientable } from '../../../Behaviors/Orientable';
import { Sizeable } from '../../../Behaviors/Sizeable';
import { Slottable } from '../../../Behaviors/Slottable';
import { Themeable } from '../../../Behaviors/Themeable';
import { addInheritanceProviderController } from '../../../Controllers/InheritanceProviderController';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Overflow } from '../../../Types/Overflow';
import { CustomElement } from '../../Abstracts/CustomElement';
import { actionbarElementTemplate } from './ActionbarElementTemplate';
import { ActionbarGroupElement } from './ActionbarGroupElement';
import { ACTIONBAR_INHERITANCE_CONTEXT } from './ActionbarInheritanceContext';
import { ActionbarItemElement } from './ActionbarItemElement';
import { ActionbarSeparatorElement } from './ActionbarSeparatorElement';
import { actionbarElementCosmopolitanStyle } from './Themes/ActionbarElement.Cosmopolitan';
import { actionbarElementJoyStyle } from './Themes/ActionbarElement.Joy';
import { actionbarElementMemphisStyle } from './Themes/ActionbarElement.Memphis';
// #endregion
/**
 * Actionbar - A generic container for organizing groups of heterogeneous controls.
 *
 * @description
 * The Actionbar component is the root container and top-level context provider for
 * the Actionbar system. It defines the Actionbar context including orientation, size,
 * disabled state, and overflow behavior. It hosts groups and separators, distributing
 * inherited state to all descendants through the inheritance controller.
 *
 * The Actionbar is explicitly not button-centric. It supports different kinds of
 * controls such as buttons, toggle buttons, split buttons, dropdown buttons,
 * comboboxes, inputs, and custom controls.
 *
 * @name Actionbar
 * @element mosaik-actionbar
 * @category Grouping
 *
 * @slot - The default slot for actionbar groups and separators
 *
 * @csspart root - The root container for the actionbar layout
 *
 * @cssprop {String} --actionbar-background-color - Background color of the actionbar
 * @cssprop {String} --actionbar-border-color - Border color for actionbar edges
 * @cssprop {String} --actionbar-border-radius - Border radius for corner rounding
 * @cssprop {String} --actionbar-border-style - Border line style
 * @cssprop {String} --actionbar-border-width - Border width
 * @cssprop {String} --actionbar-font-family - Font family
 * @cssprop {String} --actionbar-font-letter-spacing - The font letter spacing CSS custom property.
 * @cssprop {String} --actionbar-font-line-height - The font line height CSS custom property.
 * @cssprop {String} --actionbar-font-size - Font size
 * @cssprop {String} --actionbar-font-text-decoration - The font text decoration CSS custom property.
 * @cssprop {String} --actionbar-font-text-transform - The font text transform CSS custom property.
 * @cssprop {String} --actionbar-font-weight - Font weight
 * @cssprop {String} --actionbar-foreground-color - Text and icon color
 * @cssprop {String} --actionbar-gap - Spacing between groups and separators
 * @cssprop {String} --actionbar-min-height - Minimum height of the actionbar
 * @cssprop {String} --actionbar-padding-bottom - Bottom padding
 * @cssprop {String} --actionbar-padding-left - Left padding
 * @cssprop {String} --actionbar-padding-right - Right padding
 * @cssprop {String} --actionbar-padding-top - Top padding
 * @cssprop {String} --actionbar-shadow - The shadow CSS custom property.
 * @cssprop {String} --actionbar-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --actionbar-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --actionbar-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --actionbar-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --actionbar-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --actionbar-transition-duration - Duration of transitions
 * @cssprop {String} --actionbar-transition-mode - Timing function for transitions
 * @cssprop {String} --actionbar-transition-property - CSS properties to transition
 * @cssprop {String} --actionbar-translate - The translate CSS custom property.
 *
 * @fires connected {ConnectedEvent} - Fired when connected to DOM
 * @fires changed {PropertyChangedEvent} - Fired when property changes
 *
 * @example
 * Text editor formatting toolbar with grouped actions:
 * ```html
 * <mosaik-actionbar orientation="horizontal" size="md">
 *   <mosaik-actionbar-group label="Clipboard">
 *     <mosaik-actionbar-item>
 *       <mosaik-button label="Cut"></mosaik-button>
 *     </mosaik-actionbar-item>
 *     <mosaik-actionbar-item>
 *       <mosaik-button label="Copy"></mosaik-button>
 *     </mosaik-actionbar-item>
 *   </mosaik-actionbar-group>
 *   <mosaik-actionbar-separator></mosaik-actionbar-separator>
 *   <mosaik-actionbar-group label="Format">
 *     <mosaik-actionbar-item>
 *       <mosaik-toggle-button label="Bold"></mosaik-toggle-button>
 *     </mosaik-actionbar-item>
 *   </mosaik-actionbar-group>
 * </mosaik-actionbar>
 * ```
 *
 * @example
 * Vertical actionbar with disabled state:
 * ```html
 * <mosaik-actionbar orientation="vertical" disabled>
 *   <mosaik-actionbar-group>
 *     <mosaik-actionbar-item>
 *       <mosaik-button label="Action 1"></mosaik-button>
 *     </mosaik-actionbar-item>
 *   </mosaik-actionbar-group>
 * </mosaik-actionbar>
 * ```
 *
 * @public
 */
let ActionbarElement = class ActionbarElement extends Themeable(Sizeable(Orientable(Disableable(Fitable(Slottable(CustomElement)))))) {
    // #region Fields
    _provider = addInheritanceProviderController(this, {
        context: ACTIONBAR_INHERITANCE_CONTEXT,
        values: () => ({
            disabled: this.disabled,
            orientation: this.orientation,
            overflow: this.overflow,
            size: this.size
        })
    });
    _overflow;
    _wrap;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._overflow = Overflow.Visible;
        this._wrap = false;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-actionbar';
    }
    /**
     * Gets or sets the `overflow` property.
     * Controls how the actionbar handles content that exceeds its available space.
     *
     * @public
     * @attr
     */
    get overflow() {
        return this._overflow;
    }
    set overflow(value) {
        if (this._overflow !== value) {
            this._overflow = value;
            this.requestUpdate('overflow');
        }
    }
    /**
     * Gets or sets the `wrap` property.
     * When true, actionbar content wraps to the next line when space is insufficient.
     *
     * @public
     * @attr
     */
    get wrap() {
        return this._wrap;
    }
    set wrap(value) {
        if (this._wrap !== value) {
            this._wrap = value;
            this.requestUpdate('wrap');
        }
    }
};
__decorate([
    Attribute({ type: Overflow }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], ActionbarElement.prototype, "overflow", null);
__decorate([
    Attribute({ type: Boolean }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], ActionbarElement.prototype, "wrap", null);
ActionbarElement = __decorate([
    Component({
        selector: 'mosaik-actionbar',
        template: actionbarElementTemplate,
        themes: {
            joy: actionbarElementJoyStyle,
            memphis: actionbarElementMemphisStyle,
            cosmopolitan: actionbarElementCosmopolitanStyle
        },
        host: {
            role: 'toolbar'
        },
        imports: [
            ActionbarGroupElement,
            ActionbarItemElement,
            ActionbarSeparatorElement
        ]
    }),
    __metadata("design:paramtypes", [])
], ActionbarElement);
export { ActionbarElement };
//# sourceMappingURL=ActionbarElement.js.map