import * as i0 from '@angular/core';
import { InjectionToken, inject, ElementRef, forwardRef, Input, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component, HostBinding, contentChildren, signal, ContentChild, ViewChild, Optional, SkipSelf, Inject, NgModule } from '@angular/core';
import { __decorate, __metadata } from 'tslib';
import { DYNAMIC_PAGE_HEADER_TOKEN } from '@fundamental-ngx/core/shared';
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
import * as i2 from '@fundamental-ngx/cdk/utils';
import { intersectionObservable, OVERFLOW_PRIORITY_SCORE, DynamicPortalComponent, applyCssClass } from '@fundamental-ngx/cdk/utils';
import { ButtonComponent } from '@fundamental-ngx/core/button';
import * as i1 from '@fundamental-ngx/core/content-density';
import { contentDensityObserverProviders, ContentDensityMode, ContentDensityModule } from '@fundamental-ngx/core/content-density';
import * as i3 from '@fundamental-ngx/core/popover';
import { PopoverModule } from '@fundamental-ngx/core/popover';
import { TitleComponent, TitleToken } from '@fundamental-ngx/core/title';
import { BehaviorSubject, combineLatest, map, switchMap, EMPTY, filter, first } from 'rxjs';

class ToolbarItem {
}

const FD_TOOLBAR = new InjectionToken('FdToolbarComponent');

class ToolbarItemDirective {
    constructor() {
        /** The priority of the item. */
        this.fdOverflowPriority = "high" /* OverflowPriorityEnum.HIGH */;
        /** The group number of the item. */
        this.fdOverflowGroup = 0;
        /** @hidden */
        this.lastWidth = 0;
        /** @hidden */
        this._elementRef = inject(ElementRef);
    }
    /** @hidden */
    get group() {
        return this.fdOverflowGroup;
    }
    /** @hidden */
    get priority() {
        return this.fdOverflowPriority;
    }
    /** @hidden */
    get element() {
        return this._elementRef.nativeElement;
    }
    /** @hidden */
    get isSpacer() {
        return this.element.classList.contains('fd-toolbar__spacer');
    }
    /** @hidden */
    get width() {
        if (!this.element.clientWidth) {
            return this.lastWidth;
        }
        this.lastWidth = this.element.clientWidth + 8; // ELEMENT_MARGIN
        return this.lastWidth;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarItemDirective, isStandalone: true, selector: "[fd-toolbar-item], [fdOverflowGroup], [fdOverflowPriority]", inputs: { fdOverflowPriority: "fdOverflowPriority", fdOverflowGroup: "fdOverflowGroup" }, providers: [{ provide: ToolbarItem, useExisting: forwardRef(() => ToolbarItemDirective) }], ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarItemDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[fd-toolbar-item], [fdOverflowGroup], [fdOverflowPriority]',
                    providers: [{ provide: ToolbarItem, useExisting: forwardRef(() => ToolbarItemDirective) }],
                    standalone: true
                }]
        }], propDecorators: { fdOverflowPriority: [{
                type: Input
            }], fdOverflowGroup: [{
                type: Input
            }] } });

class ToolbarFormLabelDirective extends ToolbarItemDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarFormLabelDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarFormLabelDirective, isStandalone: true, selector: "[fd-toolbar-form-label]", host: { classAttribute: "fd-form-label fd-toolbar__overflow-form-label fd-toolbar__overflow-form-label--text" }, usesInheritance: true, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarFormLabelDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: '[fd-toolbar-form-label]',
                    host: {
                        class: 'fd-form-label fd-toolbar__overflow-form-label fd-toolbar__overflow-form-label--text'
                    },
                    standalone: true
                }]
        }] });

class ToolbarLabelDirective extends ToolbarItemDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarLabelDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarLabelDirective, isStandalone: true, selector: "[fd-toolbar-label]", host: { classAttribute: "fd-label fd-toolbar__overflow-label" }, usesInheritance: true, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarLabelDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: '[fd-toolbar-label]',
                    host: {
                        class: 'fd-label fd-toolbar__overflow-label'
                    },
                    standalone: true
                }]
        }] });

class ToolbarOverflowButtonMenuDirective extends ToolbarItemDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarOverflowButtonMenuDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarOverflowButtonMenuDirective, isStandalone: true, selector: "[fdToolbarOverflowButtonMenu], [fd-toolbar-overflow-button-menu]", host: { classAttribute: "fd-toolbar__overflow-button--menu" }, usesInheritance: true, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarOverflowButtonMenuDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[fdToolbarOverflowButtonMenu], [fd-toolbar-overflow-button-menu]',
                    host: {
                        class: 'fd-toolbar__overflow-button--menu'
                    },
                    standalone: true
                }]
        }] });

class ToolbarOverflowButtonDirective extends ToolbarItemDirective {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarOverflowButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarOverflowButtonDirective, isStandalone: true, selector: "[fdToolbarOverflowButton], [fd-toolbar-overflow-button]", host: { classAttribute: "fd-toolbar__overflow-button" }, usesInheritance: true, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarOverflowButtonDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[fdToolbarOverflowButton], [fd-toolbar-overflow-button]',
                    host: {
                        class: 'fd-toolbar__overflow-button'
                    },
                    standalone: true
                }]
        }] });

class ToolbarSeparatorComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarSeparatorComponent, isStandalone: true, selector: "fd-toolbar-separator", host: { classAttribute: "fd-toolbar__separator" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarSeparatorComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'fd-toolbar-separator',
                    template: '',
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    host: {
                        class: 'fd-toolbar__separator'
                    },
                    standalone: true
                }]
        }] });

class ToolbarSpacerDirective {
    constructor() {
        /** Determines the width of spacer when fixed property is set to true
         * Allowed values: absolute and relative metrics
         * Default value: 0px
         */
        this.width = '0px';
        /** Property allows user to pass additional class
         */
        this.class = '';
        /** Determines if spacer should take only size taken from width property
         * Default value: false
         * Default behaviour: spacer takes remaining space automatically
         */
        this.fixed = false;
    }
    /** @hidden */
    get css() {
        return `fd-toolbar__spacer ${this.fixed ? 'fd-toolbar__spacer--fixed' : ''} ${this.class}`;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarSpacerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: ToolbarSpacerDirective, isStandalone: true, selector: "fd-toolbar-spacer", inputs: { width: "width", class: "class", fixed: "fixed" }, host: { properties: { "style.width": "this.width", "attr.class": "this.css" } }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarSpacerDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: 'fd-toolbar-spacer',
                    standalone: true
                }]
        }], propDecorators: { width: [{
                type: HostBinding,
                args: ['style.width']
            }, {
                type: Input
            }], class: [{
                type: Input
            }], fixed: [{
                type: Input
            }], css: [{
                type: HostBinding,
                args: ['attr.class']
            }] } });

const ELEMENT_MARGIN = 8;
const OVERFLOW_BTN_COZY = 36;
const OVERFLOW_BTN_COMPACT = 32;
const MAX_CONTENT_SIZE = 99999999;
let toolbarTitleId = 0;
class ToolbarComponent {
    /** Determines if overflow button should be visible
     * Default value: false
     */
    set shouldOverflow(val) {
        this._shouldOverflow = val;
        this.shouldOverflow$.next(val);
    }
    get shouldOverflow() {
        return this._shouldOverflow;
    }
    /**
     * Heading level of the toolbar title.
     */
    set headingLevel(level) {
        if (typeof level === 'number') {
            this._headingLevel = level;
        }
        else if (typeof level === 'string') {
            this._headingLevel = Number.parseInt(level.replace(/\D/g, ''), 10);
        }
    }
    /** @hidden */
    set titleComponent(title) {
        this._titleComponent$.next(title);
    }
    get titleComponent() {
        return this._titleComponent$.value;
    }
    /** @hidden */
    get _toolbarWidth() {
        const _overflow_btn_size = this._contentDensityObserver.isCompact ? OVERFLOW_BTN_COMPACT : OVERFLOW_BTN_COZY;
        return (this.elementRef.nativeElement.clientWidth -
            (_overflow_btn_size + 4 * ELEMENT_MARGIN + 1 + this.separatorDirectives().length));
    }
    /** @hidden */
    constructor(_cd, _contentDensityObserver, _destroyRef, resizeObserverService, _injector, _dynamicPageHeader) {
        this._cd = _cd;
        this._contentDensityObserver = _contentDensityObserver;
        this._destroyRef = _destroyRef;
        this.resizeObserverService = resizeObserverService;
        this._injector = _injector;
        this._dynamicPageHeader = _dynamicPageHeader;
        /**
         * The ID of the toolbar title
         * */
        this.titleId = `fd-toolbar-title-${toolbarTitleId++}`;
        /** Determines the type of toolbar
         * Available options: 'solid' | 'transparent' | 'auto' | 'info'
         * Default value: 'solid'
         */
        this.fdType = 'solid';
        /** Determines if toolbar should has active state (only when fdType == 'info')
         * Default value: false
         */
        this.active = false;
        /** Determines if toolbar should clear border bottom
         * Default value: false
         */
        this.clearBorder = false;
        /** Whether all items should be inside overflow */
        this.forceOverflow = false;
        /** Tabindex of the toolbar element, to be used when fdType="info" */
        this.tabindex = -1;
        /** @hidden */
        this._role = 'toolbar';
        /** @hidden */
        this.toolbarItems = contentChildren(ToolbarItem, { ...(ngDevMode ? { debugName: "toolbarItems" } : {}), descendants: true });
        /** @hidden */
        this.overflownItems = [];
        /** @hidden */
        this.spacerUsed = signal(false, ...(ngDevMode ? [{ debugName: "spacerUsed" }] : []));
        /** @hidden */
        this.spacerDirectives = contentChildren(ToolbarSpacerDirective, ...(ngDevMode ? [{ debugName: "spacerDirectives" }] : []));
        /** @hidden */
        this.separatorDirectives = contentChildren(ToolbarSeparatorComponent, ...(ngDevMode ? [{ debugName: "separatorDirectives" }] : []));
        /** @hidden */
        this._headingLevel = 2;
        /** HTML Element Reference. */
        this.elementRef = inject(ElementRef);
        /** @hidden */
        this._titleComponent$ = new BehaviorSubject(null);
        /** @hidden */
        this._refreshOverflow$ = new BehaviorSubject(undefined);
        /** @hidden */
        this._shouldOverflow = false;
        /** @hidden */
        this.shouldOverflow$ = new BehaviorSubject(false);
        _contentDensityObserver.subscribe();
    }
    /** @hidden */
    buildComponentCssClass() {
        return [
            'fd-toolbar',
            `fd-toolbar--${this.fdType}`,
            `${this.active && this.fdType === 'info' ? 'fd-toolbar--active' : ''}`,
            `${this.title || this.titleComponent ? 'fd-toolbar--title' : ''}`,
            `${this.clearBorder ? 'fd-toolbar--clear' : ''}`,
            `${this._dynamicPageHeader ? 'fd-dynamic-page__toolbar' : ''}`
        ];
    }
    /** @hidden */
    ngAfterViewInit() {
        this._updateSpacerUsed();
        this.overflowItems$ = combineLatest([
            this.resizeObserverService.observe(this.elementRef.nativeElement).pipe(map(() => this._toolbarWidth)),
            toObservable(this.toolbarItems, { injector: this._injector }).pipe(map((toolbarItems) => [...toolbarItems])),
            this._titleComponent$.pipe(map((titleComponent) => {
                if (!titleComponent) {
                    return this.titleElement?.nativeElement;
                }
                return titleComponent.elementRef?.nativeElement;
            })),
            this.shouldOverflow$,
            this._refreshOverflow$
        ]).pipe(map(([toolbarWidth, toolbarItems, titleElement, shouldOverflow]) => {
            if (shouldOverflow) {
                const _sortedByPriorityAndGroupItems = this._getSortedByPriorityAndGroupItems(toolbarItems);
                const overflowItems = [];
                _sortedByPriorityAndGroupItems.reduce((_contentWidth, toolbarItem) => {
                    const itemWidth = toolbarItem.width + 2;
                    const itemPriority = toolbarItem.priority;
                    const shouldItemBeRemovedByWidth = itemWidth + _contentWidth > toolbarWidth;
                    const shouldAlwaysBeInOverflow = itemPriority === "always" /* OverflowPriorityEnum.ALWAYS */ || this.forceOverflow;
                    const shouldNeverBeInOverflow = itemPriority === "never" /* OverflowPriorityEnum.NEVER */;
                    if ((shouldItemBeRemovedByWidth && !shouldNeverBeInOverflow) || shouldAlwaysBeInOverflow) {
                        overflowItems.push(toolbarItem);
                        return shouldAlwaysBeInOverflow ? _contentWidth : MAX_CONTENT_SIZE;
                    }
                    else {
                        return _contentWidth + itemWidth;
                    }
                }, titleElement?.clientWidth || 0);
                // Hide orphans
                for (const toolbarItem of overflowItems) {
                    const groupedCollection = this._getGroupedCollection(toolbarItems);
                    const groupedCollectionPriorities = this._getGroupedCollectionPriority(groupedCollection);
                    const group = toolbarItem.group;
                    const itemPriority = toolbarItem.priority;
                    if (group !== 0 && itemPriority !== "disappear" /* OverflowPriorityEnum.DISAPPEAR */) {
                        const itemsFromCurrentGroup = this._getElementsFromCurrentGroup(group, groupedCollection, groupedCollectionPriorities) || [];
                        itemsFromCurrentGroup.forEach((i) => {
                            if (overflowItems.indexOf(i) === -1) {
                                overflowItems.push(i);
                            }
                        });
                    }
                }
                return overflowItems.sort((a, b) => this._sortPriorities(a.priority, b.priority));
            }
            return [];
        }), takeUntilDestroyed(this._destroyRef));
        this.overflowItems$.subscribe((items) => {
            this.overflownItems = items;
            this._cd.detectChanges();
        });
        this.buildComponentCssClass();
        // Use IntersectionObserver to detect when toolbar becomes visible
        // (e.g., when rendered inside a tab that was initially hidden).
        // This triggers a recalculation once the toolbar is visible and has proper dimensions.
        this.shouldOverflow$
            .pipe(switchMap((shouldOverflow) => shouldOverflow
            ? intersectionObservable(this.elementRef.nativeElement).pipe(filter((entries) => entries[0]?.isIntersecting), first())
            : EMPTY), takeUntilDestroyed(this._destroyRef))
            .subscribe(() => {
            this._refreshOverflow$.next();
        });
    }
    /** @hidden */
    ngAfterViewChecked() {
        this.buildComponentCssClass();
    }
    /** @hidden */
    ngAfterContentInit() {
        if (this.titleComponent) {
            this.titleComponent.elementRef?.nativeElement.classList.add('fd-toolbar__title');
            this.buildComponentCssClass();
        }
    }
    /** Change detection reference */
    detectChanges() {
        this._cd.detectChanges();
    }
    /** Method triggering collapsible toolbar  */
    updateCollapsibleItems() {
        this._refreshOverflow$.next();
    }
    /** @hidden */
    _updateSpacerUsed() {
        // do not render extra spacer if there is at least one passed by the application
        // and it is not fixed this.spacerUsed.set(this.spacer.length > 0 && this.spacer.some((spacer) => !spacer.fixed));
        this.spacerUsed.set(this.spacerDirectives().length > 0 && this.spacerDirectives().some((spacer) => !spacer.fixed));
    }
    /** @hidden Get group number with the lowest priority.
     *  Uses for detecting a group of elements which would be hidden from the toolbar.
     *  */
    _getLowestPriorityFromGroup(itemGroup, groupedCollectionPriority) {
        const priority = groupedCollectionPriority;
        if (!priority || !OVERFLOW_PRIORITY_SCORE.get(priority[itemGroup])) {
            return itemGroup;
        }
        const groups = Object.keys(priority);
        return groups.reduce((lowestGroup, currentGroup) => {
            const lowestGroupPriority = priority[lowestGroup];
            const currentGroupPriority = priority[currentGroup];
            if (OVERFLOW_PRIORITY_SCORE.get(currentGroupPriority) < OVERFLOW_PRIORITY_SCORE.get(lowestGroupPriority)) {
                return +currentGroup;
            }
            return lowestGroup;
        }, itemGroup);
    }
    /** @hidden */
    _getElementsFromCurrentGroup(itemGroup, groupedCollection, groupedCollectionPriority) {
        const lowestPriorityFromGroup = this._getLowestPriorityFromGroup(itemGroup, groupedCollectionPriority);
        if (!groupedCollection || !groupedCollectionPriority) {
            return [];
        }
        let itemsToRemove = groupedCollection[lowestPriorityFromGroup];
        delete groupedCollection[lowestPriorityFromGroup];
        delete groupedCollectionPriority[lowestPriorityFromGroup];
        if (lowestPriorityFromGroup !== itemGroup) {
            itemsToRemove = [...itemsToRemove, ...groupedCollection[itemGroup]];
            delete groupedCollection[itemGroup];
            delete groupedCollectionPriority[itemGroup];
        }
        return itemsToRemove;
    }
    /** @hidden Get the object with grouped arrays of elements. */
    _getGroupedCollection(toolbarItems) {
        return toolbarItems.reduce((acc, item) => {
            const itemPrio = item.priority;
            const itemGroup = item.group;
            if (itemPrio === "never" /* OverflowPriorityEnum.NEVER */ ||
                itemPrio === "always" /* OverflowPriorityEnum.ALWAYS */ ||
                itemGroup === 0) {
                return acc;
            }
            if (!acc[itemGroup]) {
                acc[itemGroup] = [];
            }
            acc[itemGroup].push(item);
            return acc;
        }, {});
    }
    /** @hidden Get the object with the highest priority for each group of elements. */
    _getGroupedCollectionPriority(groupedCollection) {
        const groups = Object.keys(groupedCollection);
        return groups.reduce((acc, itemGroup) => {
            const sortedPriorities = groupedCollection[itemGroup]
                .map((i) => i.priority)
                .filter((prio) => prio !== "always" /* OverflowPriorityEnum.ALWAYS */ && prio !== "never" /* OverflowPriorityEnum.NEVER */)
                .sort(this._sortPriorities);
            acc[itemGroup] = sortedPriorities[0];
            return acc;
        }, {});
    }
    /** @hidden Sort priorities of elements/groups. */
    _sortPriorities(a, b) {
        return OVERFLOW_PRIORITY_SCORE.get(b) - OVERFLOW_PRIORITY_SCORE.get(a);
    }
    /** @hidden Sort by group and priority and initial position */
    _getSortedByPriorityAndGroupItems(toolbarItems) {
        const notSorted = toolbarItems.map((element, index) => ({ element, index }));
        const groups = notSorted.reduce((gr, item) => {
            let groupId = item.element.group;
            const itemPrio = item.element.priority;
            if (itemPrio === "never" /* OverflowPriorityEnum.NEVER */ || itemPrio === "always" /* OverflowPriorityEnum.ALWAYS */) {
                groupId = 0;
            }
            if (!gr[groupId]) {
                gr[groupId] = [];
            }
            gr[groupId].push(item);
            return gr;
        }, {});
        const groupIds = Object.keys(groups)
            .map((g) => parseInt(g, 10))
            .filter((g) => g !== 0);
        return groupIds
            .map((g) => {
            let minIndex = Number.MAX_SAFE_INTEGER;
            let maxPriority = 0;
            for (const item of groups[g]) {
                minIndex = Math.min(minIndex, item.index);
                maxPriority = Math.max(maxPriority, OVERFLOW_PRIORITY_SCORE.get(item.element.priority) ?? -Infinity);
            }
            return { group: groups[g].map(({ element }) => element), minIndex, maxPriority };
        })
            .concat(!groups[0]
            ? []
            : groups[0].map((item) => ({
                group: [item.element],
                maxPriority: OVERFLOW_PRIORITY_SCORE.get(item.element.priority) ?? -Infinity,
                minIndex: item.index
            })))
            .sort((a, b) => b.maxPriority - a.maxPriority || a.minIndex - b.minIndex)
            .reduce((arr, i) => arr.concat(i.group), []);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ContentDensityObserver }, { token: i0.DestroyRef }, { token: i2.ResizeObserverService }, { token: i0.Injector }, { token: DYNAMIC_PAGE_HEADER_TOKEN, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: ToolbarComponent, isStandalone: true, selector: "fd-toolbar", inputs: { titleId: "titleId", class: "class", shouldOverflow: "shouldOverflow", fdType: "fdType", title: "title", active: "active", clearBorder: "clearBorder", forceOverflow: "forceOverflow", tabindex: "tabindex", headingLevel: "headingLevel", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy" }, host: { properties: { "attr.aria-label": "this.ariaLabel", "attr.aria-labelledby": "this.ariaLabelledBy", "attr.role": "this._role" } }, providers: [
            contentDensityObserverProviders({
                defaultContentDensity: ContentDensityMode.COMPACT
            }),
            {
                provide: FD_TOOLBAR,
                useExisting: ToolbarComponent
            }
        ], queries: [{ propertyName: "toolbarItems", predicate: ToolbarItem, descendants: true, isSignal: true }, { propertyName: "spacerDirectives", predicate: ToolbarSpacerDirective, isSignal: true }, { propertyName: "separatorDirectives", predicate: ToolbarSeparatorComponent, isSignal: true }, { propertyName: "titleComponent", first: true, predicate: TitleToken, descendants: true }], viewQueries: [{ propertyName: "titleElement", first: true, predicate: ["titleElement"], descendants: true, read: ElementRef }], ngImport: i0, template: "@if (title) {\n    <span\n        fd-title\n        role=\"heading\"\n        [headerSize]=\"4\"\n        [attr.aria-level]=\"_headingLevel\"\n        class=\"fd-toolbar__title\"\n        [id]=\"titleId\"\n        #titleElement\n    >\n        {{ title }}\n    </span>\n}\n<ng-content></ng-content>\n@if (overflownItems.length > 0) {\n    @if (!spacerUsed()) {\n        <fd-toolbar-spacer></fd-toolbar-spacer>\n    }\n    <fd-toolbar-separator></fd-toolbar-separator>\n    <fd-popover placement=\"bottom-end\" [noArrow]=\"true\" class=\"fd-popover\" [focusAutoCapture]=\"true\">\n        <fd-popover-control>\n            <button\n                fd-button\n                title=\"More\"\n                aria-label=\"More\"\n                aria-haspopup=\"true\"\n                fdType=\"transparent\"\n                glyph=\"overflow\"\n            ></button>\n        </fd-popover-control>\n        <fd-popover-body>\n            <div class=\"fd-toolbar__overflow\">\n                @for (overflowedItem of overflownItems; track overflowedItem) {\n                    <fdk-dynamic-portal\n                        [domElement]=\"overflowedItem.element\"\n                        [style.display]=\"overflowedItem.priority === 'disappear' ? 'none' : 'flex'\"\n                        [style.flex-direction]=\"overflowedItem.priority === 'disappear' ? undefined : 'column'\"\n                    >\n                    </fdk-dynamic-portal>\n                }\n            </div>\n        </fd-popover-body>\n    </fd-popover>\n}\n", styles: [".fd-toolbar{--fdToolbar_Height:2.75rem;--fdToolbar_Separator_Margin:0;--fdToolbar_Padding_Left:.5rem;--fdToolbar_Padding_Right:.5rem;--fdToolbar_Separator_Height:2rem;--fdToolbar_Overflow_Max_Width:100%;--fdToolbar_Separator_Width:.0625rem;--fdToolbar_Info_Color:var(--sapList_TextColor);--fdToolbar_Background:var(--sapToolbar_Background);--fdToolbar_Border_Bottom:.0625rem solid var(--sapGroup_TitleBorderColor);--fdToolbar_Border_Top:.0625rem solid var(--sapPageFooter_BorderColor);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-align:center;-ms-flex-align:center;align-items:center;background-color:var(--fdToolbar_Background);border-bottom:var(--fdToolbar_Border_Bottom);height:var(--fdToolbar_Height);padding-inline:var(--fdToolbar_Padding_Left) var(--fdToolbar_Padding_Right)}.fd-toolbar:after,.fd-toolbar:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__spacer{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:100%;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-flex:1;-ms-flex:1 auto;flex:1 auto}.fd-toolbar__spacer:after,.fd-toolbar__spacer:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__spacer--fixed{-webkit-box-flex:0;display:inline-block;-ms-flex:none;flex:none}.fd-toolbar__separator{background-color:var(--sapToolbar_SeparatorColor);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdToolbar_Separator_Height);line-height:normal;margin-block:0;margin-block:var(--fdToolbar_Separator_Margin);margin-inline:0;padding-block:0;padding-inline:0;width:var(--fdToolbar_Separator_Width)}.fd-toolbar__separator:after,.fd-toolbar__separator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__overflow{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:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;--fdToolbar_Separator_Width:auto;--fdToolbar_Separator_Height:.0625rem;--fdToolbar_Separator_Margin:.1875rem;--fdToolbar_Overflow_Padding_Block:.25rem;--fdToolbar_Overflow_Padding_Inline:.5rem;max-height:50vh;max-width:var(--fdToolbar_Overflow_Max_Width);overflow:auto;padding-block:var(--fdToolbar_Overflow_Padding_Block);padding-inline:var(--fdToolbar_Overflow_Padding_Inline)}.fd-toolbar__overflow:after,.fd-toolbar__overflow:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__overflow[class*=-compact],.fd-toolbar__overflow[class*=-condensed],[class*=-compact] .fd-toolbar__overflow:not([class*=-cozy]),[class*=-condensed] .fd-toolbar__overflow:not([class*=-cozy]){--fdToolbar_Overflow_Padding_Block:.1875rem;--fdToolbar_Overflow_Padding_Inline:.375rem}.fd-toolbar__overflow .fd-toolbar__overflow-button{margin-block:.1875rem;margin-inline:0;text-align:left;width:auto;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.fd-toolbar__overflow .fd-toolbar__overflow-button[dir=rtl],[dir=rtl] .fd-toolbar__overflow .fd-toolbar__overflow-button{text-align:right}.fd-toolbar__overflow .fd-toolbar__overflow-button--menu{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;max-width:100%}.fd-toolbar__overflow .fd-toolbar__overflow-form-label{margin-block:.625rem .125rem;margin-inline:0}.fd-toolbar__overflow .fd-toolbar__overflow-label{margin-block:.375rem;margin-inline:0}.fd-toolbar .fd-toolbar__title{--fdTitle_Font_Size:var(--sapGroup_Title_FontSize);--fdTitle_Color:var(--sapGroup_TitleTextColor)}.fd-toolbar--auto{--fdToolbar_Background:var(--fdToolbar_Auto_Background)}.fd-toolbar--solid{--fdToolbar_Background:var(--fdToolbar_Solid_Background)}.fd-toolbar--transparent{--fdToolbar_Background:var(--fdToolbar_Transparent_Background)}.fd-toolbar--ai,.fd-toolbar--clear{--fdToolbar_Border_Bottom:none}.fd-toolbar--ai{--fdToolbar_Background:var(--fdToolbar_Transparent_Background);--fdToolbar_Padding_Left:.5rem;--fdToolbar_Padding_Right:.25rem}.fd-toolbar--ai.is-active{--fdToolbar_Background:var(--fdToolbar_Solid_Background);border-top:var(--fdToolbar_Border_Top)}.fd-toolbar--title{--fdToolbar_Height:2.75rem;--fdToolbar_Padding_Left:1rem;--fdToolbar_Background:var(--sapGroup_TitleBackground)}.fd-toolbar.fd-toolbar--title-bar{padding-block:.375rem;--fdToolbar_Height:auto;--fdToolbar_Padding_Left:.75rem;--fdToolbar_Padding_Right:.75rem}.fd-toolbar--info{color:var(--fdToolbar_Info_Color);position:relative;--fdToolbar_Height:2rem;--fdToolbar_Background:var(--sapInfobar_NonInteractive_Background)}.fd-toolbar--info [class*=sap-icon]{color:var(--sapList_TextColor);font-size:1rem;height:1rem;line-height:1rem}.fd-toolbar--active{outline:none;position:relative;--fdToolbar_Background:var(--sapInfobar_Background);--fdToolbar_Info_Color:var(--sapInfobar_TextColor)}.fd-toolbar--active.is-focus:after,.fd-toolbar--active:focus:after{border-color:var(--sapContent_FocusColor);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);content:\"\";inset:.0625rem;pointer-events:none;position:absolute}.fd-toolbar--active.is-hover,.fd-toolbar--active:hover{--fdToolbar_Background:var(--sapInfobar_Hover_Background)}.fd-toolbar--active.is-active,.fd-toolbar--active:active{--fdToolbar_Background:var(--sapInfobar_Active_Background)}.fd-toolbar--active.is-focus,.fd-toolbar--active:focus{z-index:5}.fd-toolbar--active.is-focus:after,.fd-toolbar--active:focus:after{border-color:var(--fdToolbar_Info_Outline_Color)}.fd-toolbar--fade-in{opacity:1;-webkit-transition:visibility 0s linear 0s,opacity 1s;transition:visibility 0s linear 0s,opacity 1s;visibility:visible}.fd-toolbar--fade-out{opacity:0;-webkit-transition:visibility 0s linear 1s,opacity 1ms;transition:visibility 0s linear 1s,opacity 1ms;visibility:hidden}.fd-toolbar[class*=-compact],.fd-toolbar[class*=-condensed],[class*=-compact] .fd-toolbar:not([class*=-cozy]),[class*=-condensed] .fd-toolbar:not([class*=-cozy]){--fdToolbar_Height:2rem;--fdToolbar_Separator_Height:1.5rem;--fdToolbar_Overflow_Max_Width:20rem}.fd-toolbar[class*=-compact].fd-toolbar--title,.fd-toolbar[class*=-condensed].fd-toolbar--title,[class*=-compact] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title,[class*=-condensed] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title{--fdToolbar_Height:2.75rem}.fd-toolbar[class*=-compact].fd-toolbar--title-bar,.fd-toolbar[class*=-condensed].fd-toolbar--title-bar,[class*=-compact] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title-bar,[class*=-condensed] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title-bar{--fdToolbar_Height:auto}.fd-toolbar>*{flex-shrink:0}fdk-dynamic-portal:not(:last-of-type) [fd-toolbar-item]{margin-bottom:.25rem}\n/*! Bundled license information:\n\nfundamental-styles/dist/toolbar.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"], dependencies: [{ kind: "directive", type: ToolbarSpacerDirective, selector: "fd-toolbar-spacer", inputs: ["width", "class", "fixed"] }, { kind: "component", type: ToolbarSeparatorComponent, selector: "fd-toolbar-separator" }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3.PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "component", type: i3.PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"], outputs: ["onClose"] }, { kind: "component", type: i3.PopoverComponent, selector: "fd-popover", inputs: ["config", "title", "trigger", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll", "placement", "maxWidth", "fillControlMode", "closeOnOutsideClick", "closeOnEscapeKey", "disabled", "triggers", "focusTrapped", "focusAutoCapture", "restoreFocusOnClose", "noArrow", "disableScrollbar", "appendTo", "placementContainer", "scrollStrategy", "cdkPositions", "applyOverlay", "additionalBodyClass", "additionalTriggerClass", "closeOnNavigation", "fixedPosition", "resizable", "isOpen"], outputs: ["triggerChange", "isOpenChange", "beforeOpen"] }, { kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button], span[fd-button]", inputs: ["id"], exportAs: ["fd-button"] }, { kind: "component", type: DynamicPortalComponent, selector: "fdk-dynamic-portal", inputs: ["domElement", "component", "template", "auto"], outputs: ["attached"] }, { kind: "component", type: TitleComponent, selector: "[fd-title], [fdTitle]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
__decorate([
    applyCssClass,
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Array)
], ToolbarComponent.prototype, "buildComponentCssClass", null);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-toolbar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                        contentDensityObserverProviders({
                            defaultContentDensity: ContentDensityMode.COMPACT
                        }),
                        {
                            provide: FD_TOOLBAR,
                            useExisting: ToolbarComponent
                        }
                    ], imports: [
                        ToolbarSpacerDirective,
                        ToolbarSeparatorComponent,
                        PopoverModule,
                        ButtonComponent,
                        DynamicPortalComponent,
                        TitleComponent
                    ], template: "@if (title) {\n    <span\n        fd-title\n        role=\"heading\"\n        [headerSize]=\"4\"\n        [attr.aria-level]=\"_headingLevel\"\n        class=\"fd-toolbar__title\"\n        [id]=\"titleId\"\n        #titleElement\n    >\n        {{ title }}\n    </span>\n}\n<ng-content></ng-content>\n@if (overflownItems.length > 0) {\n    @if (!spacerUsed()) {\n        <fd-toolbar-spacer></fd-toolbar-spacer>\n    }\n    <fd-toolbar-separator></fd-toolbar-separator>\n    <fd-popover placement=\"bottom-end\" [noArrow]=\"true\" class=\"fd-popover\" [focusAutoCapture]=\"true\">\n        <fd-popover-control>\n            <button\n                fd-button\n                title=\"More\"\n                aria-label=\"More\"\n                aria-haspopup=\"true\"\n                fdType=\"transparent\"\n                glyph=\"overflow\"\n            ></button>\n        </fd-popover-control>\n        <fd-popover-body>\n            <div class=\"fd-toolbar__overflow\">\n                @for (overflowedItem of overflownItems; track overflowedItem) {\n                    <fdk-dynamic-portal\n                        [domElement]=\"overflowedItem.element\"\n                        [style.display]=\"overflowedItem.priority === 'disappear' ? 'none' : 'flex'\"\n                        [style.flex-direction]=\"overflowedItem.priority === 'disappear' ? undefined : 'column'\"\n                    >\n                    </fdk-dynamic-portal>\n                }\n            </div>\n        </fd-popover-body>\n    </fd-popover>\n}\n", styles: [".fd-toolbar{--fdToolbar_Height:2.75rem;--fdToolbar_Separator_Margin:0;--fdToolbar_Padding_Left:.5rem;--fdToolbar_Padding_Right:.5rem;--fdToolbar_Separator_Height:2rem;--fdToolbar_Overflow_Max_Width:100%;--fdToolbar_Separator_Width:.0625rem;--fdToolbar_Info_Color:var(--sapList_TextColor);--fdToolbar_Background:var(--sapToolbar_Background);--fdToolbar_Border_Bottom:.0625rem solid var(--sapGroup_TitleBorderColor);--fdToolbar_Border_Top:.0625rem solid var(--sapPageFooter_BorderColor);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-align:center;-ms-flex-align:center;align-items:center;background-color:var(--fdToolbar_Background);border-bottom:var(--fdToolbar_Border_Bottom);height:var(--fdToolbar_Height);padding-inline:var(--fdToolbar_Padding_Left) var(--fdToolbar_Padding_Right)}.fd-toolbar:after,.fd-toolbar:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__spacer{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:100%;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-flex:1;-ms-flex:1 auto;flex:1 auto}.fd-toolbar__spacer:after,.fd-toolbar__spacer:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__spacer--fixed{-webkit-box-flex:0;display:inline-block;-ms-flex:none;flex:none}.fd-toolbar__separator{background-color:var(--sapToolbar_SeparatorColor);border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdToolbar_Separator_Height);line-height:normal;margin-block:0;margin-block:var(--fdToolbar_Separator_Margin);margin-inline:0;padding-block:0;padding-inline:0;width:var(--fdToolbar_Separator_Width)}.fd-toolbar__separator:after,.fd-toolbar__separator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__overflow{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:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;--fdToolbar_Separator_Width:auto;--fdToolbar_Separator_Height:.0625rem;--fdToolbar_Separator_Margin:.1875rem;--fdToolbar_Overflow_Padding_Block:.25rem;--fdToolbar_Overflow_Padding_Inline:.5rem;max-height:50vh;max-width:var(--fdToolbar_Overflow_Max_Width);overflow:auto;padding-block:var(--fdToolbar_Overflow_Padding_Block);padding-inline:var(--fdToolbar_Overflow_Padding_Inline)}.fd-toolbar__overflow:after,.fd-toolbar__overflow:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-toolbar__overflow[class*=-compact],.fd-toolbar__overflow[class*=-condensed],[class*=-compact] .fd-toolbar__overflow:not([class*=-cozy]),[class*=-condensed] .fd-toolbar__overflow:not([class*=-cozy]){--fdToolbar_Overflow_Padding_Block:.1875rem;--fdToolbar_Overflow_Padding_Inline:.375rem}.fd-toolbar__overflow .fd-toolbar__overflow-button{margin-block:.1875rem;margin-inline:0;text-align:left;width:auto;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.fd-toolbar__overflow .fd-toolbar__overflow-button[dir=rtl],[dir=rtl] .fd-toolbar__overflow .fd-toolbar__overflow-button{text-align:right}.fd-toolbar__overflow .fd-toolbar__overflow-button--menu{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;max-width:100%}.fd-toolbar__overflow .fd-toolbar__overflow-form-label{margin-block:.625rem .125rem;margin-inline:0}.fd-toolbar__overflow .fd-toolbar__overflow-label{margin-block:.375rem;margin-inline:0}.fd-toolbar .fd-toolbar__title{--fdTitle_Font_Size:var(--sapGroup_Title_FontSize);--fdTitle_Color:var(--sapGroup_TitleTextColor)}.fd-toolbar--auto{--fdToolbar_Background:var(--fdToolbar_Auto_Background)}.fd-toolbar--solid{--fdToolbar_Background:var(--fdToolbar_Solid_Background)}.fd-toolbar--transparent{--fdToolbar_Background:var(--fdToolbar_Transparent_Background)}.fd-toolbar--ai,.fd-toolbar--clear{--fdToolbar_Border_Bottom:none}.fd-toolbar--ai{--fdToolbar_Background:var(--fdToolbar_Transparent_Background);--fdToolbar_Padding_Left:.5rem;--fdToolbar_Padding_Right:.25rem}.fd-toolbar--ai.is-active{--fdToolbar_Background:var(--fdToolbar_Solid_Background);border-top:var(--fdToolbar_Border_Top)}.fd-toolbar--title{--fdToolbar_Height:2.75rem;--fdToolbar_Padding_Left:1rem;--fdToolbar_Background:var(--sapGroup_TitleBackground)}.fd-toolbar.fd-toolbar--title-bar{padding-block:.375rem;--fdToolbar_Height:auto;--fdToolbar_Padding_Left:.75rem;--fdToolbar_Padding_Right:.75rem}.fd-toolbar--info{color:var(--fdToolbar_Info_Color);position:relative;--fdToolbar_Height:2rem;--fdToolbar_Background:var(--sapInfobar_NonInteractive_Background)}.fd-toolbar--info [class*=sap-icon]{color:var(--sapList_TextColor);font-size:1rem;height:1rem;line-height:1rem}.fd-toolbar--active{outline:none;position:relative;--fdToolbar_Background:var(--sapInfobar_Background);--fdToolbar_Info_Color:var(--sapInfobar_TextColor)}.fd-toolbar--active.is-focus:after,.fd-toolbar--active:focus:after{border-color:var(--sapContent_FocusColor);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);content:\"\";inset:.0625rem;pointer-events:none;position:absolute}.fd-toolbar--active.is-hover,.fd-toolbar--active:hover{--fdToolbar_Background:var(--sapInfobar_Hover_Background)}.fd-toolbar--active.is-active,.fd-toolbar--active:active{--fdToolbar_Background:var(--sapInfobar_Active_Background)}.fd-toolbar--active.is-focus,.fd-toolbar--active:focus{z-index:5}.fd-toolbar--active.is-focus:after,.fd-toolbar--active:focus:after{border-color:var(--fdToolbar_Info_Outline_Color)}.fd-toolbar--fade-in{opacity:1;-webkit-transition:visibility 0s linear 0s,opacity 1s;transition:visibility 0s linear 0s,opacity 1s;visibility:visible}.fd-toolbar--fade-out{opacity:0;-webkit-transition:visibility 0s linear 1s,opacity 1ms;transition:visibility 0s linear 1s,opacity 1ms;visibility:hidden}.fd-toolbar[class*=-compact],.fd-toolbar[class*=-condensed],[class*=-compact] .fd-toolbar:not([class*=-cozy]),[class*=-condensed] .fd-toolbar:not([class*=-cozy]){--fdToolbar_Height:2rem;--fdToolbar_Separator_Height:1.5rem;--fdToolbar_Overflow_Max_Width:20rem}.fd-toolbar[class*=-compact].fd-toolbar--title,.fd-toolbar[class*=-condensed].fd-toolbar--title,[class*=-compact] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title,[class*=-condensed] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title{--fdToolbar_Height:2.75rem}.fd-toolbar[class*=-compact].fd-toolbar--title-bar,.fd-toolbar[class*=-condensed].fd-toolbar--title-bar,[class*=-compact] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title-bar,[class*=-condensed] .fd-toolbar:not([class*=-cozy]).fd-toolbar--title-bar{--fdToolbar_Height:auto}.fd-toolbar>*{flex-shrink:0}fdk-dynamic-portal:not(:last-of-type) [fd-toolbar-item]{margin-bottom:.25rem}\n/*! Bundled license information:\n\nfundamental-styles/dist/toolbar.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.ChangeDetectorRef }, { type: i1.ContentDensityObserver }, { type: i0.DestroyRef }, { type: i2.ResizeObserverService }, { type: i0.Injector }, { type: undefined, decorators: [{
                    type: Optional
                }, {
                    type: SkipSelf
                }, {
                    type: Inject,
                    args: [DYNAMIC_PAGE_HEADER_TOKEN]
                }] }], propDecorators: { titleId: [{
                type: Input
            }], class: [{
                type: Input
            }], shouldOverflow: [{
                type: Input
            }], fdType: [{
                type: Input
            }], title: [{
                type: Input
            }], active: [{
                type: Input
            }], clearBorder: [{
                type: Input
            }], forceOverflow: [{
                type: Input
            }], tabindex: [{
                type: Input
            }], headingLevel: [{
                type: Input
            }], ariaLabel: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.aria-label']
            }], ariaLabelledBy: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.aria-labelledby']
            }], titleElement: [{
                type: ViewChild,
                args: ['titleElement', { read: ElementRef }]
            }], _role: [{
                type: HostBinding,
                args: ['attr.role']
            }], toolbarItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ToolbarItem), { ...{ descendants: true }, isSignal: true }] }], titleComponent: [{
                type: ContentChild,
                args: [TitleToken]
            }], spacerDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ToolbarSpacerDirective), { isSignal: true }] }], separatorDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ToolbarSeparatorComponent), { isSignal: true }] }], buildComponentCssClass: [] } });

const components = [
    ToolbarComponent,
    ToolbarItemDirective,
    ToolbarSpacerDirective,
    ToolbarSeparatorComponent,
    ToolbarFormLabelDirective,
    ToolbarLabelDirective,
    ToolbarOverflowButtonDirective,
    ToolbarOverflowButtonMenuDirective
];
/**
 * @deprecated
 * Use direct imports of components and directives.
 */
class ToolbarModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: ToolbarModule, imports: [ContentDensityModule, ToolbarComponent,
            ToolbarItemDirective,
            ToolbarSpacerDirective,
            ToolbarSeparatorComponent,
            ToolbarFormLabelDirective,
            ToolbarLabelDirective,
            ToolbarOverflowButtonDirective,
            ToolbarOverflowButtonMenuDirective], exports: [ToolbarComponent,
            ToolbarItemDirective,
            ToolbarSpacerDirective,
            ToolbarSeparatorComponent,
            ToolbarFormLabelDirective,
            ToolbarLabelDirective,
            ToolbarOverflowButtonDirective,
            ToolbarOverflowButtonMenuDirective, ContentDensityModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarModule, imports: [ContentDensityModule, ToolbarComponent, ContentDensityModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ToolbarModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [ContentDensityModule, ...components],
                    exports: [...components, ContentDensityModule]
                }]
        }] });

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

export { FD_TOOLBAR, ToolbarComponent, ToolbarFormLabelDirective, ToolbarItem, ToolbarItemDirective, ToolbarLabelDirective, ToolbarModule, ToolbarOverflowButtonDirective, ToolbarOverflowButtonMenuDirective, ToolbarSeparatorComponent, ToolbarSpacerDirective };
//# sourceMappingURL=fundamental-ngx-core-toolbar.mjs.map
