import { __decorate, __metadata } from 'tslib';
import * as i0 from '@angular/core';
import { input, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, booleanAttribute, viewChild, HostBinding, Directive, NgModule } from '@angular/core';
import { applyCssClass } from '@fundamental-ngx/cdk/utils';
import * as i1 from '@fundamental-ngx/core/content-density';
import { contentDensityObserverProviders, ContentDensityMode } from '@fundamental-ngx/core/content-density';
import { Subscription } from 'rxjs';
import { BaseButton, ButtonComponent } from '@fundamental-ngx/core/button';

/**
 * The Bar component is a container that holds titles, buttons and input controls.
 * Its content is distributed in three areas - left, middle and right.
 * The Bar has 2 modes - Desktop (default) and Tablet/Mobile (cozy).
 */
class BarComponent {
    /** @hidden */
    constructor(elementRef, _contentDensityObserver) {
        this.elementRef = elementRef;
        this._contentDensityObserver = _contentDensityObserver;
        /** The size of the Page in Page responsive design.
         * Available sizes: 's' | 'm_l' | 'xl'
         */
        this.size = '';
        /** Aria role for the Bar
         * default is toolbar
         */
        this.role = input('toolbar', ...(ngDevMode ? [{ debugName: "role" }] : []));
        /** @hidden */
        this._subscriptions = new Subscription();
        this._contentDensityObserver.subscribe();
    }
    /** @hidden
     * CssClassBuilder interface implementation
     * function must return single string
     * function is responsible for order which css classes are applied
     */
    buildComponentCssClass() {
        return [
            'fd-bar',
            this._contentDensityObserver.isCompact || this._contentDensityObserver.isCondensed ? '' : 'fd-bar--cozy', // TODO: fix in styles
            this.barDesign ? `fd-bar--${this.barDesign}` : '',
            this.inPage && !this.size ? 'fd-bar--page' : '',
            this.inPage && this.size ? `fd-bar--page-${this.size}` : '',
            this.inHomePage && !this.size ? 'fd-bar--home-page' : '',
            this.inHomePage && this.size ? `fd-bar--home-page-${this.size}` : '',
            this.clear ? 'fd-bar--clear' : '',
            this.class
        ];
    }
    /** @hidden */
    ngOnInit() {
        this.buildComponentCssClass();
    }
    /** @hidden */
    ngOnDestroy() {
        this._subscriptions.unsubscribe();
    }
    /** @hidden */
    ngOnChanges() {
        this.buildComponentCssClass();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarComponent, deps: [{ token: i0.ElementRef }, { token: i1.ContentDensityObserver }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: BarComponent, isStandalone: true, selector: "[fd-bar]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: false, isRequired: false, transformFunction: null }, barDesign: { classPropertyName: "barDesign", publicName: "barDesign", isSignal: false, isRequired: false, transformFunction: null }, inPage: { classPropertyName: "inPage", publicName: "inPage", isSignal: false, isRequired: false, transformFunction: null }, inHomePage: { classPropertyName: "inHomePage", publicName: "inHomePage", isSignal: false, isRequired: false, transformFunction: null }, clear: { classPropertyName: "clear", publicName: "clear", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "role()" } }, providers: [
            contentDensityObserverProviders({
                defaultContentDensity: ContentDensityMode.COMPACT
            })
        ], usesOnChanges: true, ngImport: i0, template: "<ng-content select=\"[fd-bar-left]\"></ng-content>\n<ng-content select=\"[fd-bar-middle]\"></ng-content>\n<ng-content select=\"[fd-bar-right]\"></ng-content>\n<ng-content></ng-content>\n", styles: [".fd-bar{--fdBar_Z_Index:1;--fdBar_Height:2.75rem;--fdBar_Padding_X:1rem;--fdBar_Padding_Top:0;--fdBar_Padding_Bottom:0;--fdBar_Border_Radius:0;--fdBar_Floating_Footer_Offset_X:.5rem;--fdBar_Floating_Footer_Offset_Y:.5rem;--fdBar_Shadow:var(--sapContent_HeaderShadow);--fdBar_Background:var(--sapPageHeader_Background);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:.5rem;-webkit-box-pack:justify;-ms-flex-pack:justify;background:var(--fdBar_Background);border-radius:var(--fdBar_Border_Radius);-webkit-box-shadow:var(--fdBar_Shadow);box-shadow:var(--fdBar_Shadow);height:var(--fdBar_Height);justify-content:space-between;padding-block:var(--fdBar_Padding_Top) var(--fdBar_Padding_Bottom);padding-inline:var(--fdBar_Padding_X);z-index:var(--fdBar_Z_Index)}.fd-bar:after,.fd-bar:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-bar .fd-bar__header{color:var(--sapPageHeader_TextColor);font-family:var(--sapFontHeaderFamily);font-size:var(--sapFontHeader5Size)}.fd-bar__left,.fd-bar__middle,.fd-bar__right{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:.5rem;max-width:100%;width:100%}.fd-bar__left:after,.fd-bar__left:before,.fd-bar__middle:after,.fd-bar__middle:before,.fd-bar__right:after,.fd-bar__right:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-bar__middle{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.fd-bar__right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.fd-bar__element{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--fdBar_Element_Text_Color,var(--sapTextColor));font-family:var(--fdBar_Element_Text_Font_Family,var(--sapFontFamily));font-size:var(--fdBar_Element_Text_Font_Size,var(--sapFontSize));max-height:100%;max-width:100%}.fd-bar__element:after,.fd-bar__element:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-bar__element--full-width{width:100%}.fd-bar__element--full-width>:first-child{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media(width<=599px){.fd-bar--responsive-paddings{padding-inline:1rem}}@media(width>=600px)and (width<=1023px){.fd-bar--responsive-paddings{padding-inline:2rem}}@media(width>=1024px)and (width<=1439px){.fd-bar--responsive-paddings{padding-inline:2rem}}@media(width>=1440px){.fd-bar--responsive-paddings{padding-inline:3rem}}.fd-bar--header{--fdBar_Shadow:var(--sapContent_HeaderShadow);--fdBar_Background:var(--sapPageHeader_Background);--fdBar_Element_Text_Color:var(sapPageHeader_TextColor);--fdBar_Element_Text_Font_Family:var(--sapFontHeaderFamily);--fdBar_Element_Text_Font_Size:var(--sapFontHeader5Size)}.fd-bar--header:has(+.fd-bar--subheader){--fdBar_Shadow:none}.fd-bar--subheader{--fdBar_Height:3rem;--fdBar_Padding_Bottom:.25rem;--fdBar_Shadow:var(--sapContent_HeaderShadow);--fdBar_Background:var(--sapPageHeader_Background)}.fd-bar--header-with-subheader{--fdBar_Z_Index:2;--fdBar_Shadow:none;--fdBar_Background:var(--sapPageHeader_Background);position:relative}.fd-bar--footer{--fdBar_Shadow:none;--fdBar_Background:var(--sapPageFooter_Background);--fdBar_Element_Text_Color:var(--sapPageFooter_TextColor);border-top:var(--sapGroup_TitleBorderWidth) solid var(--sapPageFooter_BorderColor)}.fd-bar--floating-footer{--fdBar_Shadow:var(--sapContent_Shadow1);--fdBar_Z_Index:map.get($fd-z-index-levels,\"top\");--fdBar_Background:var(--sapPageFooter_Background);--fdBar_Element_Text_Color:var(--sapPageFooter_TextColor);--fdBar_Border_Radius:var(--sapElement_BorderCornerRadius);bottom:var(--fdBar_Floating_Footer_Offset_Y);left:var(--fdBar_Floating_Footer_Offset_X);opacity:1;position:absolute;right:var(--fdBar_Floating_Footer_Offset_X)}.fd-bar--growing{--fdBar_Height:auto;--fdBar_Padding_Top:.25rem;--fdBar_Padding_Bottom:.25rem;min-height:2.5rem}.fd-bar--growing.fd-bar--header{--fdBar_Padding_Top:.375rem}.fd-bar--home-page,.fd-bar--page{--fdBar_Padding_X:1rem}.fd-bar--home-page.fd-bar--floating-footer,.fd-bar--page.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:1rem}.fd-bar--page-s,.fd-bar--page-sm{--fdBar_Padding_X:1rem}.fd-bar--page-s.fd-bar--floating-footer,.fd-bar--page-sm.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:1rem}.fd-bar--home-page-s,.fd-bar--home-page-sm{--fdBar_Padding_X:.5rem}.fd-bar--home-page-s.fd-bar--floating-footer,.fd-bar--home-page-sm.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:1rem}.fd-bar--home-page-m_l,.fd-bar--home-page-md_lg,.fd-bar--page-m_l,.fd-bar--page-md_lg{--fdBar_Padding_X:2rem}.fd-bar--home-page-m_l.fd-bar--floating-footer,.fd-bar--home-page-md_lg.fd-bar--floating-footer,.fd-bar--page-m_l.fd-bar--floating-footer,.fd-bar--page-md_lg.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:2rem}.fd-bar--home-page-xl,.fd-bar--page-xl{--fdBar_Padding_X:3rem}.fd-bar--home-page-xl.fd-bar--floating-footer,.fd-bar--page-xl.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:3rem}.fd-bar[class*=-compact],.fd-bar[class*=-condensed],[class*=-compact] .fd-bar:not([class*=-cozy]),[class*=-condensed] .fd-bar:not([class*=-cozy]){--fdBar_Height:2.5rem}.fd-bar[class*=-compact].fd-bar--subheader,.fd-bar[class*=-condensed].fd-bar--subheader,[class*=-compact] .fd-bar:not([class*=-cozy]).fd-bar--subheader,[class*=-condensed] .fd-bar:not([class*=-cozy]).fd-bar--subheader{--fdBar_Height:2.25rem}.fd-bar__left:has(.fd-bar__element>*:is(:empty,[style*=\"display: none\"])){gap:0}.fd-bar--clear{--fdBar_Shadow: none}\n/*! Bundled license information:\n\nfundamental-styles/dist/bar.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
__decorate([
    applyCssClass,
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Array)
], BarComponent.prototype, "buildComponentCssClass", null);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarComponent, decorators: [{
            type: Component,
            args: [{ selector: '[fd-bar]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                        contentDensityObserverProviders({
                            defaultContentDensity: ContentDensityMode.COMPACT
                        })
                    ], host: {
                        '[attr.role]': 'role()'
                    }, standalone: true, template: "<ng-content select=\"[fd-bar-left]\"></ng-content>\n<ng-content select=\"[fd-bar-middle]\"></ng-content>\n<ng-content select=\"[fd-bar-right]\"></ng-content>\n<ng-content></ng-content>\n", styles: [".fd-bar{--fdBar_Z_Index:1;--fdBar_Height:2.75rem;--fdBar_Padding_X:1rem;--fdBar_Padding_Top:0;--fdBar_Padding_Bottom:0;--fdBar_Border_Radius:0;--fdBar_Floating_Footer_Offset_X:.5rem;--fdBar_Floating_Footer_Offset_Y:.5rem;--fdBar_Shadow:var(--sapContent_HeaderShadow);--fdBar_Background:var(--sapPageHeader_Background);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:.5rem;-webkit-box-pack:justify;-ms-flex-pack:justify;background:var(--fdBar_Background);border-radius:var(--fdBar_Border_Radius);-webkit-box-shadow:var(--fdBar_Shadow);box-shadow:var(--fdBar_Shadow);height:var(--fdBar_Height);justify-content:space-between;padding-block:var(--fdBar_Padding_Top) var(--fdBar_Padding_Bottom);padding-inline:var(--fdBar_Padding_X);z-index:var(--fdBar_Z_Index)}.fd-bar:after,.fd-bar:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-bar .fd-bar__header{color:var(--sapPageHeader_TextColor);font-family:var(--sapFontHeaderFamily);font-size:var(--sapFontHeader5Size)}.fd-bar__left,.fd-bar__middle,.fd-bar__right{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:.5rem;max-width:100%;width:100%}.fd-bar__left:after,.fd-bar__left:before,.fd-bar__middle:after,.fd-bar__middle:before,.fd-bar__right:after,.fd-bar__right:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-bar__middle{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.fd-bar__right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.fd-bar__element{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--fdBar_Element_Text_Color,var(--sapTextColor));font-family:var(--fdBar_Element_Text_Font_Family,var(--sapFontFamily));font-size:var(--fdBar_Element_Text_Font_Size,var(--sapFontSize));max-height:100%;max-width:100%}.fd-bar__element:after,.fd-bar__element:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-bar__element--full-width{width:100%}.fd-bar__element--full-width>:first-child{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}@media(width<=599px){.fd-bar--responsive-paddings{padding-inline:1rem}}@media(width>=600px)and (width<=1023px){.fd-bar--responsive-paddings{padding-inline:2rem}}@media(width>=1024px)and (width<=1439px){.fd-bar--responsive-paddings{padding-inline:2rem}}@media(width>=1440px){.fd-bar--responsive-paddings{padding-inline:3rem}}.fd-bar--header{--fdBar_Shadow:var(--sapContent_HeaderShadow);--fdBar_Background:var(--sapPageHeader_Background);--fdBar_Element_Text_Color:var(sapPageHeader_TextColor);--fdBar_Element_Text_Font_Family:var(--sapFontHeaderFamily);--fdBar_Element_Text_Font_Size:var(--sapFontHeader5Size)}.fd-bar--header:has(+.fd-bar--subheader){--fdBar_Shadow:none}.fd-bar--subheader{--fdBar_Height:3rem;--fdBar_Padding_Bottom:.25rem;--fdBar_Shadow:var(--sapContent_HeaderShadow);--fdBar_Background:var(--sapPageHeader_Background)}.fd-bar--header-with-subheader{--fdBar_Z_Index:2;--fdBar_Shadow:none;--fdBar_Background:var(--sapPageHeader_Background);position:relative}.fd-bar--footer{--fdBar_Shadow:none;--fdBar_Background:var(--sapPageFooter_Background);--fdBar_Element_Text_Color:var(--sapPageFooter_TextColor);border-top:var(--sapGroup_TitleBorderWidth) solid var(--sapPageFooter_BorderColor)}.fd-bar--floating-footer{--fdBar_Shadow:var(--sapContent_Shadow1);--fdBar_Z_Index:map.get($fd-z-index-levels,\"top\");--fdBar_Background:var(--sapPageFooter_Background);--fdBar_Element_Text_Color:var(--sapPageFooter_TextColor);--fdBar_Border_Radius:var(--sapElement_BorderCornerRadius);bottom:var(--fdBar_Floating_Footer_Offset_Y);left:var(--fdBar_Floating_Footer_Offset_X);opacity:1;position:absolute;right:var(--fdBar_Floating_Footer_Offset_X)}.fd-bar--growing{--fdBar_Height:auto;--fdBar_Padding_Top:.25rem;--fdBar_Padding_Bottom:.25rem;min-height:2.5rem}.fd-bar--growing.fd-bar--header{--fdBar_Padding_Top:.375rem}.fd-bar--home-page,.fd-bar--page{--fdBar_Padding_X:1rem}.fd-bar--home-page.fd-bar--floating-footer,.fd-bar--page.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:1rem}.fd-bar--page-s,.fd-bar--page-sm{--fdBar_Padding_X:1rem}.fd-bar--page-s.fd-bar--floating-footer,.fd-bar--page-sm.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:1rem}.fd-bar--home-page-s,.fd-bar--home-page-sm{--fdBar_Padding_X:.5rem}.fd-bar--home-page-s.fd-bar--floating-footer,.fd-bar--home-page-sm.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:1rem}.fd-bar--home-page-m_l,.fd-bar--home-page-md_lg,.fd-bar--page-m_l,.fd-bar--page-md_lg{--fdBar_Padding_X:2rem}.fd-bar--home-page-m_l.fd-bar--floating-footer,.fd-bar--home-page-md_lg.fd-bar--floating-footer,.fd-bar--page-m_l.fd-bar--floating-footer,.fd-bar--page-md_lg.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:2rem}.fd-bar--home-page-xl,.fd-bar--page-xl{--fdBar_Padding_X:3rem}.fd-bar--home-page-xl.fd-bar--floating-footer,.fd-bar--page-xl.fd-bar--floating-footer{--fdBar_Padding_X:.5rem;--fdBar_Floating_Footer_Offset_X:3rem}.fd-bar[class*=-compact],.fd-bar[class*=-condensed],[class*=-compact] .fd-bar:not([class*=-cozy]),[class*=-condensed] .fd-bar:not([class*=-cozy]){--fdBar_Height:2.5rem}.fd-bar[class*=-compact].fd-bar--subheader,.fd-bar[class*=-condensed].fd-bar--subheader,[class*=-compact] .fd-bar:not([class*=-cozy]).fd-bar--subheader,[class*=-condensed] .fd-bar:not([class*=-cozy]).fd-bar--subheader{--fdBar_Height:2.25rem}.fd-bar__left:has(.fd-bar__element>*:is(:empty,[style*=\"display: none\"])){gap:0}.fd-bar--clear{--fdBar_Shadow: none}\n/*! Bundled license information:\n\nfundamental-styles/dist/bar.css:\n  (*!\n   * Fundamental Library Styles v0.40.1\n   * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n   * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n   *)\n*/\n"] }]
        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ContentDensityObserver }], propDecorators: { class: [{
                type: Input
            }], barDesign: [{
                type: Input
            }], inPage: [{
                type: Input
            }], inHomePage: [{
                type: Input
            }], clear: [{
                type: Input
            }], size: [{
                type: Input
            }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], buildComponentCssClass: [] } });

const FD_BUTTON_BAR_COMPONENT = new InjectionToken('FdButtonBarComponent');

let randomButtonBarId = 0;
class ButtonBarComponent extends BaseButton {
    constructor() {
        super(...arguments);
        /** Whether the element should take the whole width of the container. */
        this.fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : {}), transform: booleanAttribute });
        /** The type of the button. Types include:
         * 'standard' | 'positive' | 'negative' | 'attention' | 'half' | 'ghost' | 'transparent' | 'emphasized' | 'menu'.
         * Default value is set to 'transparent'
         */
        this.fdType = input('transparent', ...(ngDevMode ? [{ debugName: "fdType" }] : []));
        /** adding title to the button */
        this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
        /** the aria-labelledby ids to be associated with this element */
        this.ariaLabelledby = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelledby" }] : []));
        /** id for this element */
        this.id = input(`fd-button-bar-id-${randomButtonBarId++}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
        /** @hidden */
        this.buttonComponent = viewChild(ButtonComponent, ...(ngDevMode ? [{ debugName: "buttonComponent" }] : []));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ButtonBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.0", type: ButtonBarComponent, isStandalone: true, selector: "fd-button-bar", inputs: { fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, fdType: { classPropertyName: "fdType", publicName: "fdType", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.fd-bar__element--full-width": "fullWidth()", "style.pointer-events": "disabled() ? \"none\" : \"auto\"" }, classAttribute: "fd-bar__element" }, providers: [
            {
                provide: FD_BUTTON_BAR_COMPONENT,
                useExisting: ButtonBarComponent
            }
        ], viewQueries: [{ propertyName: "buttonComponent", first: true, predicate: ButtonComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
        <button
            fd-button
            [id]="id()"
            [type]="type()"
            [glyphPosition]="glyphPosition()"
            [glyph]="glyph()"
            [fdType]="fdType()"
            [label]="label()"
            [attr.title]="title()"
            [ariaLabel]="ariaLabel()"
            [fdMenu]="fdMenu()"
            [disabled]="disabled()"
        >
            <ng-content></ng-content>
        </button>
    `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button], span[fd-button]", inputs: ["id"], exportAs: ["fd-button"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ButtonBarComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'fd-button-bar',
                    template: `
        <button
            fd-button
            [id]="id()"
            [type]="type()"
            [glyphPosition]="glyphPosition()"
            [glyph]="glyph()"
            [fdType]="fdType()"
            [label]="label()"
            [attr.title]="title()"
            [ariaLabel]="ariaLabel()"
            [fdMenu]="fdMenu()"
            [disabled]="disabled()"
        >
            <ng-content></ng-content>
        </button>
    `,
                    providers: [
                        {
                            provide: FD_BUTTON_BAR_COMPONENT,
                            useExisting: ButtonBarComponent
                        }
                    ],
                    imports: [ButtonComponent],
                    host: {
                        class: 'fd-bar__element',
                        '[class.fd-bar__element--full-width]': 'fullWidth()',
                        '[style.pointer-events]': 'disabled() ? "none" : "auto"'
                    }
                }]
        }], propDecorators: { fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], fdType: [{ type: i0.Input, args: [{ isSignal: true, alias: "fdType", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], buttonComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ButtonComponent), { isSignal: true }] }] } });

/**
 * An element of the Bar.
 */
class BarElementDirective {
    constructor() {
        /** Whether the element should take the whole width of the container. */
        this.fullWidth = false;
        /** @hidden */
        this.barElement = true;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: BarElementDirective, isStandalone: true, selector: "fd-bar-element", inputs: { fullWidth: "fullWidth" }, host: { properties: { "class.fd-bar__element--full-width": "this.fullWidth", "class.fd-bar__element": "this.barElement" } }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarElementDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: 'fd-bar-element',
                    standalone: true
                }]
        }], propDecorators: { fullWidth: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['class.fd-bar__element--full-width']
            }], barElement: [{
                type: HostBinding,
                args: ['class.fd-bar__element']
            }] } });

/**
 * The left side area of the Bar component.
 */
class BarLeftDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarLeftDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: BarLeftDirective, isStandalone: true, selector: "[fd-bar-left]", host: { classAttribute: "fd-bar__left" }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarLeftDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: '[fd-bar-left]',
                    host: {
                        class: 'fd-bar__left'
                    },
                    standalone: true
                }]
        }] });

/**
 * The middle section of the Bar component.
 */
class BarMiddleDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarMiddleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: BarMiddleDirective, isStandalone: true, selector: "[fd-bar-middle]", host: { classAttribute: "fd-bar__middle" }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarMiddleDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: '[fd-bar-middle]',
                    host: {
                        class: 'fd-bar__middle'
                    },
                    standalone: true
                }]
        }] });

/**
 * The right side area of the Bar component.
 */
class BarRightDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarRightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: BarRightDirective, isStandalone: true, selector: "[fd-bar-right]", host: { classAttribute: "fd-bar__right" }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarRightDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: '[fd-bar-right]',
                    host: {
                        class: 'fd-bar__right'
                    },
                    standalone: true
                }]
        }] });

const components = [
    BarComponent,
    BarLeftDirective,
    BarMiddleDirective,
    BarRightDirective,
    BarElementDirective,
    ButtonBarComponent
];
/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class BarModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: BarModule, imports: [BarComponent,
            BarLeftDirective,
            BarMiddleDirective,
            BarRightDirective,
            BarElementDirective,
            ButtonBarComponent], exports: [BarComponent,
            BarLeftDirective,
            BarMiddleDirective,
            BarRightDirective,
            BarElementDirective,
            ButtonBarComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarModule, imports: [ButtonBarComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BarModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [...components],
                    exports: [...components]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { BarComponent, BarElementDirective, BarLeftDirective, BarMiddleDirective, BarModule, BarRightDirective, ButtonBarComponent, FD_BUTTON_BAR_COMPONENT };
//# sourceMappingURL=fundamental-ngx-core-bar.mjs.map
