import { Overlay } from '@angular/cdk/overlay';
import * as i1 from '@angular/cdk/portal';
import { ComponentPortal, PortalModule, CdkPortalOutlet, DomPortal, TemplatePortal } from '@angular/cdk/portal';
import * as i0 from '@angular/core';
import { InjectionToken, input, signal, inject, DestroyRef, effect, Injector, Component, computed, viewChildren, ViewEncapsulation, TemplateRef, Directive, booleanAttribute, output, contentChild, ElementRef, ChangeDetectionStrategy, isDevMode, viewChild, ViewContainerRef, Renderer2, afterNextRender, Injectable, NgModule } from '@angular/core';
import { toSignal, toObservable, takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
import { destroyObservable, ViewportSizeObservable, ResponsiveBreakpoints } from '@fundamental-ngx/cdk/utils';
import { FD_LANGUAGE, TranslationResolver, I18nModule, patchLanguage } from '@fundamental-ngx/i18n';
import { of, map, withLatestFrom, merge, fromEvent, startWith, Observable, takeUntil, filter, Subject, combineLatest, tap } from 'rxjs';
import { ScrollbarDirective } from '@fundamental-ngx/core/scrollbar';
import { Router, NavigationStart } from '@angular/router';
import { switchMap } from 'rxjs/operators';
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
import { ButtonComponent } from '@fundamental-ngx/core/button';
import { ContentDensityDirective } from '@fundamental-ngx/core/content-density';
import { IconComponent } from '@fundamental-ngx/core/icon';

class MessageStripAlertRef {
}

const defaultConfig = {
    position: 'top-middle',
    messageStrip: {},
    closeOnNavigation: false
};
/**
 * Applies default config to the given config
 */
function applyDefaultConfig(config) {
    return { ...defaultConfig, ...config };
}

/**
 * Injection token for getting the position of the message strip alert container.
 * Is available in any of the message strip alert components and in footer component.
 */
const MessageStripAlertContainerPosition = new InjectionToken('MessageStripAlertContainerPosition');
/**
 * Injection token for getting the list of the message strip alert refs
 * in the given container. Is available in the footer component injection
 * context.
 */
const MessageStripAlertContainerAlertRefs = new InjectionToken('MessageStripAlertContainerAlertRefs');
const MessageStripAlertComponentData = new InjectionToken('MessageStripAlertComponentData');

/**
 * The component that represents the footer of the message strip alert container.
 * if user has provided the footer component through service, then this component
 * will render it inside itself.
 * Bear in mind that this component is always created, just sometimes if there is nothing to render
 * it will be empty.
 */
class MessageStripAlertContainerFooterComponent {
    /** @hidden */
    constructor() {
        /** @hidden */
        this.alertRefs = input([], ...(ngDevMode ? [{ debugName: "alertRefs" }] : []));
        /**
         * Reference to the user provided component's portal.
         * @hidden
         */
        this._footerComponentPortal = signal(undefined, ...(ngDevMode ? [{ debugName: "_footerComponentPortal" }] : []));
        /**
         * Position of the overlay in which this component is rendered.
         */
        this._position = inject(MessageStripAlertContainerPosition);
        /** @hidden */
        this._destroyRef = inject(DestroyRef);
        /** @hidden */
        this._messageStripAlertService = inject(MessageStripAlertService);
        /**
         * Footer component from service as signal.
         */
        this._footerComponent = toSignal(this._messageStripAlertService.footerComponents$, {
            initialValue: {}
        });
        // Convert alertRefs signal to observable in injection context
        this._alertRefs$ = toObservable(this.alertRefs).pipe(takeUntilDestroyed(this._destroyRef));
        effect(() => {
            const footerComponent = this._footerComponent()[this._position];
            if (footerComponent) {
                this._footerComponentPortal.set(new ComponentPortal(footerComponent, null, Injector.create({
                    providers: [
                        {
                            provide: MessageStripAlertContainerAlertRefs,
                            useValue: this._alertRefs$
                        }
                    ]
                })));
            }
            else {
                this._footerComponentPortal.set(undefined);
            }
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0", type: MessageStripAlertContainerFooterComponent, isStandalone: true, selector: "fd-message-strip-alert-container-footer", inputs: { alertRefs: { classPropertyName: "alertRefs", publicName: "alertRefs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: ` <ng-template [cdkPortalOutlet]="_footerComponentPortal()"></ng-template> `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerFooterComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-message-strip-alert-container-footer', template: ` <ng-template [cdkPortalOutlet]="_footerComponentPortal()"></ng-template> `, imports: [PortalModule], styles: [":host{display:block}\n"] }]
        }], ctorParameters: () => [], propDecorators: { alertRefs: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertRefs", required: false }] }] } });

/**
 * This will be rendered in the overlay. It is responsible for rendering the alerts and the footer.
 */
class MessageStripAlertContainerComponent {
    constructor() {
        /**
         * The list of the elements that are attached to the container.
         */
        this.attachedElements = signal([], ...(ngDevMode ? [{ debugName: "attachedElements" }] : []));
        /**
         * List of the rendered message strip alerts. It is used in the footer and is injected into the
         * user-provided footer component portal. This way, user has full control over the container alerts.
         * @hidden
         */
        this._alertRefs = computed(() => this._portalOutlets()
            .map((outlet) => {
            const componentRef = outlet.attachedRef;
            return componentRef?.instance?.alertRef;
        })
            .filter((ref) => !!ref), ...(ngDevMode ? [{ debugName: "_alertRefs" }] : []));
        /** @hidden */
        this._portalOutlets = viewChildren(CdkPortalOutlet, ...(ngDevMode ? [{ debugName: "_portalOutlets" }] : []));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: MessageStripAlertContainerComponent, isStandalone: true, selector: "fd-message-strip-alert-container", viewQueries: [{ propertyName: "_portalOutlets", predicate: CdkPortalOutlet, descendants: true, isSignal: true }], ngImport: i0, template: `
        <div fdScrollbar>
            @for (portal of attachedElements(); track portal) {
                <ng-template [cdkPortalOutlet]="portal"></ng-template>
            }
        </div>
        <fd-message-strip-alert-container-footer [alertRefs]="_alertRefs()"></fd-message-strip-alert-container-footer>
    `, isInline: true, styles: [".fd-message-strip-alert-overlay{max-width:33.33vw;padding:.5rem}.fd-message-strip-alert-overlay--top{top:0;max-height:100vh}.fd-message-strip-alert-overlay--top.fd-message-strip-alert-overlay--bottom-opened{max-height:50vh}.fd-message-strip-alert-overlay--bottom{top:initial;bottom:0;max-height:100vh}.fd-message-strip-alert-overlay--bottom fd-message-strip-alert-container{flex-direction:column-reverse}.fd-message-strip-alert-overlay--bottom.fd-message-strip-alert-overlay--top-opened{max-height:50vh}.fd-message-strip-alert-overlay--start{left:0}.fd-message-strip-alert-overlay--middle{left:33.33vw;width:33.33vw}@media screen and (max-width:992px){.fd-message-strip-alert-overlay--middle{left:5vw;width:90vw;max-width:90vw}}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container{width:100%}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container>.fd-scrollbar>*{width:fit-content;margin:0 auto}.fd-message-strip-alert-overlay--end{right:0}.fd-message-strip-alert-overlay fd-message-strip-alert-container{display:flex;flex-direction:column}.fd-message-strip-alert-overlay fd-message-strip-alert-container div[fdscrollbar]{width:100%;display:flex;padding:.5rem;gap:.75rem;flex-direction:column;max-height:100%}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: ScrollbarDirective, selector: "[fdScrollbar], [fd-scrollbar]", inputs: ["noHorizontalScroll", "noVerticalScroll", "alwaysVisible"] }, { kind: "component", type: MessageStripAlertContainerFooterComponent, selector: "fd-message-strip-alert-container-footer", inputs: ["alertRefs"] }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertContainerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-message-strip-alert-container', template: `
        <div fdScrollbar>
            @for (portal of attachedElements(); track portal) {
                <ng-template [cdkPortalOutlet]="portal"></ng-template>
            }
        </div>
        <fd-message-strip-alert-container-footer [alertRefs]="_alertRefs()"></fd-message-strip-alert-container-footer>
    `, encapsulation: ViewEncapsulation.None, imports: [PortalModule, ScrollbarDirective, MessageStripAlertContainerFooterComponent], styles: [".fd-message-strip-alert-overlay{max-width:33.33vw;padding:.5rem}.fd-message-strip-alert-overlay--top{top:0;max-height:100vh}.fd-message-strip-alert-overlay--top.fd-message-strip-alert-overlay--bottom-opened{max-height:50vh}.fd-message-strip-alert-overlay--bottom{top:initial;bottom:0;max-height:100vh}.fd-message-strip-alert-overlay--bottom fd-message-strip-alert-container{flex-direction:column-reverse}.fd-message-strip-alert-overlay--bottom.fd-message-strip-alert-overlay--top-opened{max-height:50vh}.fd-message-strip-alert-overlay--start{left:0}.fd-message-strip-alert-overlay--middle{left:33.33vw;width:33.33vw}@media screen and (max-width:992px){.fd-message-strip-alert-overlay--middle{left:5vw;width:90vw;max-width:90vw}}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container{width:100%}.fd-message-strip-alert-overlay--middle fd-message-strip-alert-container>.fd-scrollbar>*{width:fit-content;margin:0 auto}.fd-message-strip-alert-overlay--end{right:0}.fd-message-strip-alert-overlay fd-message-strip-alert-container{display:flex;flex-direction:column}.fd-message-strip-alert-overlay fd-message-strip-alert-container div[fdscrollbar]{width:100%;display:flex;padding:.5rem;gap:.75rem;flex-direction:column;max-height:100%}\n"] }]
        }], propDecorators: { _portalOutlets: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });

class MessageStripIconDirective {
    constructor() {
        this.templateRef = inject(TemplateRef);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: MessageStripIconDirective, isStandalone: true, selector: "[fdMessageStripIcon]", ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripIconDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[fdMessageStripIcon]'
                }]
        }] });

const MESSAGE_STRIP_CLOSABLE = 'coreMessageStrip.closable';
const MESSAGE_STRIP_DEFAULT_DISMISS_BUTTON_TEXT = 'coreMessageStrip.dismissLabel';
const DEFAULT_HIDDEN_TEXT = 'Message strip';
const DEFAULT_DISMISS_BUTTON_TEXT = 'Close';

let messageStripUniqueId = 0;
/**
 * The component that represents a message-strip. It can only be used inline.
 */
class MessageStripComponent {
    /** @hidden */
    constructor() {
        /** Whether the message strip is dismissible. */
        this.dismissible = input(true, { ...(ngDevMode ? { debugName: "dismissible" } : {}), transform: booleanAttribute });
        /** Id of the element that labels the message-strip. */
        this.ariaLabelledBy = input(null, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : []));
        /** Title for dismiss button */
        this.dismissBtnTitle = input('', ...(ngDevMode ? [{ debugName: "dismissBtnTitle" }] : []));
        /** The default message strip does not have an icon.
         * The other types (warning, success, information and error) have icons by default.
         * To remove the icon set the property to true.
         */
        this.noIcon = input(false, { ...(ngDevMode ? { debugName: "noIcon" } : {}), transform: booleanAttribute });
        /** The type of the message strip.
         * Can be one of *warning*, *success*, *information*, *error* or null.
         */
        this.type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
        /** Id for the message-strip component. If omitted, a unique one is generated. */
        this.id = input('', { ...(ngDevMode ? { debugName: "id" } : {}), transform: (value) => value || `fd-message-strip-${++messageStripUniqueId}` });
        /** Aria label for the message-strip component element. */
        this.ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
        /** Width of the message-strip. */
        this.width = input('', ...(ngDevMode ? [{ debugName: "width" }] : []));
        /** Minimum width of the message-strip. */
        this.minWidth = input('', ...(ngDevMode ? [{ debugName: "minWidth" }] : []));
        /** Margin bottom of the message-strip. */
        this.marginBottom = input('', ...(ngDevMode ? [{ debugName: "marginBottom" }] : []));
        /** indication color of the message-strip. */
        this.indicationColor = input(...(ngDevMode ? [undefined, { debugName: "indicationColor" }] : []));
        /** Event fired when the message-strip is dismissed. */
        // eslint-disable-next-line @angular-eslint/no-output-on-prefix
        this.onDismiss = output();
        /** Custom icon component */
        this.icon = contentChild(MessageStripIconDirective, ...(ngDevMode ? [{ debugName: "icon" }] : []));
        /** @hidden */
        this.elementRef = inject(ElementRef);
        /**
         * Computed aria-labelledby attribute.
         * @hidden
         */
        this.hostAriaLabelledBy = computed(() => {
            const labelledBy = this.ariaLabelledBy();
            if (labelledBy) {
                return labelledBy;
            }
            const currentId = this.id();
            return `${currentId}-hidden-text ${currentId}-content-text`;
        }, ...(ngDevMode ? [{ debugName: "hostAriaLabelledBy" }] : []));
        /**
         * Computed CSS class string for the component.
         * @hidden
         */
        this.cssClass = computed(() => {
            const classes = ['fd-message-strip'];
            const currentType = this.type();
            const currentIndicationColor = this.indicationColor();
            if (currentType) {
                classes.push(`fd-message-strip--${currentType}`);
            }
            if (this.dismissible()) {
                classes.push('fd-message-strip--dismissible');
            }
            if (this.noIcon()) {
                classes.push('fd-message-strip--no-icon');
            }
            if (currentIndicationColor) {
                classes.push(`fd-message-strip--indication-color-${currentIndicationColor}`);
            }
            return classes.join(' ');
        }, ...(ngDevMode ? [{ debugName: "cssClass" }] : []));
        /**
         * Whether icon container should be shown.
         * @hidden
         */
        this.shouldShowIcon = computed(() => {
            if (this.noIcon()) {
                return false;
            }
            return !!this.icon() || !!this.type();
        }, ...(ngDevMode ? [{ debugName: "shouldShowIcon" }] : []));
        /**
         * Type-specific icon name.
         * @hidden
         */
        this.typeSpecificIconName = computed(() => {
            const currentType = this.type();
            switch (currentType) {
                case "warning" /* MessageStripTypeEnum.WARNING */:
                    return "alert" /* MessageStringIconEnum.ALERT */;
                case "success" /* MessageStripTypeEnum.SUCCESS */:
                    return "sys-enter-2" /* MessageStringIconEnum.SUCCESS */;
                case "error" /* MessageStripTypeEnum.ERROR */:
                    return "error" /* MessageStringIconEnum.ERROR */;
                case "information" /* MessageStripTypeEnum.INFORMATION */:
                    return "information" /* MessageStringIconEnum.INFORMATION */;
                default:
                    return '';
            }
        }, ...(ngDevMode ? [{ debugName: "typeSpecificIconName" }] : []));
        /** @hidden */
        this._destroyRef = inject(DestroyRef);
        /** @hidden */
        this._lang$ = inject(FD_LANGUAGE);
        /** @hidden */
        this._translationResolver = inject(TranslationResolver);
        // Initialize with defaults
        this.messageStripHiddenText$ = of(DEFAULT_HIDDEN_TEXT);
        this.defaultDismissButtonText$ = of(DEFAULT_DISMISS_BUTTON_TEXT);
        // Update when type changes
        effect(() => {
            const currentType = this.type();
            if (!currentType) {
                this.messageStripHiddenText$ = of(DEFAULT_HIDDEN_TEXT);
                this.defaultDismissButtonText$ = of(DEFAULT_DISMISS_BUTTON_TEXT);
                return;
            }
            const announcementMap = {
                ["warning" /* MessageStripTypeEnum.WARNING */]: "coreMessageStrip.announcementWarning" /* MessageStripAnnouncement.WARNING */,
                ["success" /* MessageStripTypeEnum.SUCCESS */]: "coreMessageStrip.announcementSuccess" /* MessageStripAnnouncement.SUCCESS */,
                ["error" /* MessageStripTypeEnum.ERROR */]: "coreMessageStrip.announcementError" /* MessageStripAnnouncement.ERROR */,
                ["information" /* MessageStripTypeEnum.INFORMATION */]: "coreMessageStrip.announcementInfo" /* MessageStripAnnouncement.INFORMATION */
            };
            const announcementType = announcementMap[currentType];
            if (announcementType) {
                const announcement$ = this._translateAnnouncement(announcementType);
                this.messageStripHiddenText$ = this._buildMessageStripHiddenText(announcement$);
                this.defaultDismissButtonText$ = this._getHiddenButtonText(announcement$);
            }
            else {
                this.messageStripHiddenText$ = of(DEFAULT_HIDDEN_TEXT);
                this.defaultDismissButtonText$ = of(DEFAULT_DISMISS_BUTTON_TEXT);
            }
        });
    }
    /**
     * Dismisses the message-strip.
     */
    dismiss() {
        this.elementRef.nativeElement.classList.add('fd-has-display-none');
        this.elementRef.nativeElement.classList.remove('fd-has-display-block');
        this.onDismiss.emit();
    }
    /** @hidden */
    _translateAnnouncement(announcementType) {
        return this._lang$.pipe(takeUntilDestroyed(this._destroyRef), map((lang) => this._translationResolver.resolve(lang, announcementType)));
    }
    /** @hidden */
    _buildMessageStripHiddenText(announcement$) {
        return this._lang$.pipe(takeUntilDestroyed(this._destroyRef), withLatestFrom(announcement$), map(([lang, announcement]) => {
            const closable = this._translationResolver.resolve(lang, MESSAGE_STRIP_CLOSABLE);
            return `${announcement} ${this.dismissible() ? closable : ''}`;
        }));
    }
    /** @hidden **/
    _getHiddenButtonText(announcement$) {
        return this._lang$.pipe(takeUntilDestroyed(this._destroyRef), withLatestFrom(announcement$), map(([lang, announcement]) => {
            const closeButtonText = this._translationResolver.resolve(lang, MESSAGE_STRIP_DEFAULT_DISMISS_BUTTON_TEXT);
            return `${announcement} ${closeButtonText}`;
        }));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: MessageStripComponent, isStandalone: true, selector: "fd-message-strip", inputs: { dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, dismissBtnTitle: { classPropertyName: "dismissBtnTitle", publicName: "dismissBtnTitle", isSignal: true, isRequired: false, transformFunction: null }, noIcon: { classPropertyName: "noIcon", publicName: "noIcon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, indicationColor: { classPropertyName: "indicationColor", publicName: "indicationColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDismiss: "onDismiss" }, host: { attributes: { "role": "note" }, properties: { "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "hostAriaLabelledBy()", "attr.id": "id()", "style.width": "width()", "style.min-width": "minWidth()", "style.margin-bottom": "marginBottom()", "class": "cssClass()" } }, queries: [{ propertyName: "icon", first: true, predicate: MessageStripIconDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (shouldShowIcon()) {\n    <div class=\"fd-message-strip__icon-container\" aria-hidden=\"true\">\n        @if (icon()) {\n            <ng-template [ngTemplateOutlet]=\"icon()!.templateRef\"></ng-template>\n        } @else {\n            <fd-icon [glyph]=\"typeSpecificIconName()\" role=\"presentation\" aria-hidden=\"true\"></fd-icon>\n            <span class=\"fd-message-strip__sr-only\" id=\"{{ id() }}-hidden-text\">{{\n                messageStripHiddenText$ | async\n            }}</span>\n        }\n    </div>\n}\n<p class=\"fd-message-strip__text\" id=\"{{ id() }}-content-text\">\n    <ng-content></ng-content>\n</p>\n@if (dismissible()) {\n    <button\n        class=\"fd-message-strip__close\"\n        fd-button\n        glyph=\"decline\"\n        fdType=\"transparent\"\n        fdCompact\n        (click)=\"dismiss()\"\n        [attr.aria-controls]=\"id()\"\n        [attr.aria-label]=\"dismissBtnTitle() || (defaultDismissButtonText$ | async)\"\n        [attr.title]=\"dismissBtnTitle() || (defaultDismissButtonText$ | async)\"\n    ></button>\n}\n", styles: [".fd-message-strip{--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Neutral);--fdMessageStrip_Background_Color:var(--sapNeutralBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Neutral);--fdMessageStrip_Text_Color:var(--sapTextColor);--fdMessageStrip_Vertical_Padding:.4375rem;--fdMessageStrip_Left_Padding:2.4375rem;--fdMessageStrip_Right_Padding:.9375rem;background:var(--fdMessageStrip_Background_Color);border:0;border-color:var(--fdMessageStrip_Border_Color);border-radius:var(--fdMessageStrip_Border_Radius);border-style:solid;border-width:var(--fdMessageStrip_Border_Width);-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:auto;line-height:normal;margin-block:0;margin-inline:0;min-height:2rem;padding-block:0;padding-block:var(--fdMessageStrip_Vertical_Padding);padding-inline:0;padding-inline:var(--fdMessageStrip_Left_Padding) var(--fdMessageStrip_Right_Padding);position:relative}.fd-message-strip:after,.fd-message-strip:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-message-strip .fd-message-strip__close{position:absolute;right:.125rem;top:.125rem}.fd-message-strip .fd-message-strip__close[dir=rtl],[dir=rtl] .fd-message-strip .fd-message-strip__close{left:.125rem;right:auto}.fd-message-strip__text{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdMessageStrip_Text_Color);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;line-height:1rem;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;white-space:normal;word-break:break-word}.fd-message-strip__text:after,.fd-message-strip__text:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-message-strip__icon-container{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(--fdMessageStrip_Icon_Color);font-size:1rem;left:0;max-width:2.5rem;min-width:2.5rem;position:absolute;top:var(--fdMessageStrip_Vertical_Padding);width:2.5rem}.fd-message-strip__icon-container:after,.fd-message-strip__icon-container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-message-strip__icon-container[dir=rtl],[dir=rtl] .fd-message-strip__icon-container{left:auto;right:0}.fd-message-strip__icon-container [class*=sap-icon]{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;color:var(--fdMessageStrip_Icon_Color);height:1rem;line-height:1;max-height:1rem;max-width:1rem;min-height:1rem;min-width:1rem;width:1rem}.fd-message-strip--warning{--fdMessageStrip_Background_Color:var(--sapWarningBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Warning);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Warning)}.fd-message-strip--error{--fdMessageStrip_Background_Color:var(--sapErrorBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Error);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Error)}.fd-message-strip--success{--fdMessageStrip_Background_Color:var(--sapSuccessBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Success);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Success)}.fd-message-strip--information{--fdMessageStrip_Background_Color:var(--sapInformationBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Information);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Informative)}.fd-message-strip--no-icon{--fdMessageStrip_Left_Padding:.9375rem;--fdMessageStrip_Right_Padding:.9375rem}.fd-message-strip--dismissible{--fdMessageStrip_Left_Padding:2.4375rem;--fdMessageStrip_Right_Padding:2.4375rem}.fd-message-strip--dismissible.fd-message-strip--no-icon{--fdMessageStrip_Left_Padding:.9375rem;--fdMessageStrip_Right_Padding:2.4375rem}.fd-message-strip--link a{text-shadow:var(--sapContent_TextShadow)}.fd-message-strip--indication-color-1{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_1_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_1_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_1_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_1_Background)}.fd-message-strip--indication-color-2{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_2_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_2_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_2_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_2_Background)}.fd-message-strip--indication-color-3{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_3_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_3_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_3_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_3_Background)}.fd-message-strip--indication-color-4{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_4_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_4_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_4_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_4_Background)}.fd-message-strip--indication-color-5{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_5_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_5_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_5_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_5_Background)}.fd-message-strip--indication-color-6{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_6_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_6_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_6_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_6_Background)}.fd-message-strip--indication-color-7{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_7_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_7_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_7_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_7_Background)}.fd-message-strip--indication-color-8{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_8_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_8_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_8_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_8_Background)}.fd-message-strip--indication-color-9{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_9_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_9_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_9_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_9_Background)}.fd-message-strip--indication-color-10{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_10_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_10_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_10_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_10_Background)}.fd-message-strip--indication-color-1b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_1);--fdMessageStrip_Text_Color:var(--sapIndicationColor_1);--fdMessageStrip_Border_Color:var(--sapIndicationColor_1b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_1b)}.fd-message-strip--indication-color-2b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_2);--fdMessageStrip_Text_Color:var(--sapIndicationColor_2);--fdMessageStrip_Border_Color:var(--sapIndicationColor_2b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_2b)}.fd-message-strip--indication-color-3b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_3);--fdMessageStrip_Text_Color:var(--sapIndicationColor_3);--fdMessageStrip_Border_Color:var(--sapIndicationColor_3b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_3b)}.fd-message-strip--indication-color-4b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_4);--fdMessageStrip_Text_Color:var(--sapIndicationColor_4);--fdMessageStrip_Border_Color:var(--sapIndicationColor_4b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_4b)}.fd-message-strip--indication-color-5b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_5);--fdMessageStrip_Text_Color:var(--sapIndicationColor_5);--fdMessageStrip_Border_Color:var(--sapIndicationColor_5b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_5b)}.fd-message-strip--indication-color-6b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_6);--fdMessageStrip_Text_Color:var(--sapIndicationColor_6);--fdMessageStrip_Border_Color:var(--sapIndicationColor_6b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_6b)}.fd-message-strip--indication-color-7b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_7);--fdMessageStrip_Text_Color:var(--sapIndicationColor_7);--fdMessageStrip_Border_Color:var(--sapIndicationColor_7b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_7b)}.fd-message-strip--indication-color-8b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_8);--fdMessageStrip_Text_Color:var(--sapIndicationColor_8);--fdMessageStrip_Border_Color:var(--sapIndicationColor_8b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_8b)}.fd-message-strip--indication-color-9b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_9);--fdMessageStrip_Text_Color:var(--sapIndicationColor_9);--fdMessageStrip_Border_Color:var(--sapIndicationColor_9b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_9b)}.fd-message-strip--indication-color-10b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_10);--fdMessageStrip_Text_Color:var(--sapIndicationColor_10);--fdMessageStrip_Border_Color:var(--sapIndicationColor_10b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_10b)}.fd-message-strip,.fd-has-display-block{display:block}.fd-has-display-none{display:none}.fd-message-strip__sr-only{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-user-select:none;user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0px}\n/*! Bundled license information:\n\nfundamental-styles/dist/message-strip.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: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button], span[fd-button]", inputs: ["id"], exportAs: ["fd-button"] }, { kind: "directive", type: ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]),                [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]),                [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]),                [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }, { kind: "ngmodule", type: I18nModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "class", "ariaLabel", "ariaHidden"], outputs: ["ariaHiddenChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripComponent, decorators: [{
            type: Component,
            args: [{ selector: 'fd-message-strip', host: {
                        '[attr.aria-label]': 'ariaLabel()',
                        '[attr.aria-labelledby]': 'hostAriaLabelledBy()',
                        '[attr.id]': 'id()',
                        '[style.width]': 'width()',
                        '[style.min-width]': 'minWidth()',
                        '[style.margin-bottom]': 'marginBottom()',
                        '[class]': 'cssClass()',
                        role: 'note'
                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, ContentDensityDirective, I18nModule, NgTemplateOutlet, IconComponent, AsyncPipe], template: "@if (shouldShowIcon()) {\n    <div class=\"fd-message-strip__icon-container\" aria-hidden=\"true\">\n        @if (icon()) {\n            <ng-template [ngTemplateOutlet]=\"icon()!.templateRef\"></ng-template>\n        } @else {\n            <fd-icon [glyph]=\"typeSpecificIconName()\" role=\"presentation\" aria-hidden=\"true\"></fd-icon>\n            <span class=\"fd-message-strip__sr-only\" id=\"{{ id() }}-hidden-text\">{{\n                messageStripHiddenText$ | async\n            }}</span>\n        }\n    </div>\n}\n<p class=\"fd-message-strip__text\" id=\"{{ id() }}-content-text\">\n    <ng-content></ng-content>\n</p>\n@if (dismissible()) {\n    <button\n        class=\"fd-message-strip__close\"\n        fd-button\n        glyph=\"decline\"\n        fdType=\"transparent\"\n        fdCompact\n        (click)=\"dismiss()\"\n        [attr.aria-controls]=\"id()\"\n        [attr.aria-label]=\"dismissBtnTitle() || (defaultDismissButtonText$ | async)\"\n        [attr.title]=\"dismissBtnTitle() || (defaultDismissButtonText$ | async)\"\n    ></button>\n}\n", styles: [".fd-message-strip{--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Neutral);--fdMessageStrip_Background_Color:var(--sapNeutralBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Neutral);--fdMessageStrip_Text_Color:var(--sapTextColor);--fdMessageStrip_Vertical_Padding:.4375rem;--fdMessageStrip_Left_Padding:2.4375rem;--fdMessageStrip_Right_Padding:.9375rem;background:var(--fdMessageStrip_Background_Color);border:0;border-color:var(--fdMessageStrip_Border_Color);border-radius:var(--fdMessageStrip_Border_Radius);border-style:solid;border-width:var(--fdMessageStrip_Border_Width);-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:auto;line-height:normal;margin-block:0;margin-inline:0;min-height:2rem;padding-block:0;padding-block:var(--fdMessageStrip_Vertical_Padding);padding-inline:0;padding-inline:var(--fdMessageStrip_Left_Padding) var(--fdMessageStrip_Right_Padding);position:relative}.fd-message-strip:after,.fd-message-strip:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-message-strip .fd-message-strip__close{position:absolute;right:.125rem;top:.125rem}.fd-message-strip .fd-message-strip__close[dir=rtl],[dir=rtl] .fd-message-strip .fd-message-strip__close{left:.125rem;right:auto}.fd-message-strip__text{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdMessageStrip_Text_Color);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;line-height:1rem;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;white-space:normal;word-break:break-word}.fd-message-strip__text:after,.fd-message-strip__text:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-message-strip__icon-container{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(--fdMessageStrip_Icon_Color);font-size:1rem;left:0;max-width:2.5rem;min-width:2.5rem;position:absolute;top:var(--fdMessageStrip_Vertical_Padding);width:2.5rem}.fd-message-strip__icon-container:after,.fd-message-strip__icon-container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-message-strip__icon-container[dir=rtl],[dir=rtl] .fd-message-strip__icon-container{left:auto;right:0}.fd-message-strip__icon-container [class*=sap-icon]{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;color:var(--fdMessageStrip_Icon_Color);height:1rem;line-height:1;max-height:1rem;max-width:1rem;min-height:1rem;min-width:1rem;width:1rem}.fd-message-strip--warning{--fdMessageStrip_Background_Color:var(--sapWarningBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Warning);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Warning)}.fd-message-strip--error{--fdMessageStrip_Background_Color:var(--sapErrorBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Error);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Error)}.fd-message-strip--success{--fdMessageStrip_Background_Color:var(--sapSuccessBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Success);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Success)}.fd-message-strip--information{--fdMessageStrip_Background_Color:var(--sapInformationBackground);--fdMessageStrip_Icon_Color:var(--fdMessageStrip_Icon_Color_Information);--fdMessageStrip_Border_Color:var(--fdMessageStrip_Border_Color_Informative)}.fd-message-strip--no-icon{--fdMessageStrip_Left_Padding:.9375rem;--fdMessageStrip_Right_Padding:.9375rem}.fd-message-strip--dismissible{--fdMessageStrip_Left_Padding:2.4375rem;--fdMessageStrip_Right_Padding:2.4375rem}.fd-message-strip--dismissible.fd-message-strip--no-icon{--fdMessageStrip_Left_Padding:.9375rem;--fdMessageStrip_Right_Padding:2.4375rem}.fd-message-strip--link a{text-shadow:var(--sapContent_TextShadow)}.fd-message-strip--indication-color-1{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_1_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_1_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_1_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_1_Background)}.fd-message-strip--indication-color-2{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_2_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_2_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_2_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_2_Background)}.fd-message-strip--indication-color-3{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_3_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_3_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_3_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_3_Background)}.fd-message-strip--indication-color-4{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_4_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_4_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_4_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_4_Background)}.fd-message-strip--indication-color-5{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_5_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_5_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_5_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_5_Background)}.fd-message-strip--indication-color-6{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_6_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_6_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_6_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_6_Background)}.fd-message-strip--indication-color-7{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_7_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_7_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_7_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_7_Background)}.fd-message-strip--indication-color-8{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_8_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_8_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_8_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_8_Background)}.fd-message-strip--indication-color-9{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_9_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_9_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_9_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_9_Background)}.fd-message-strip--indication-color-10{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_10_TextColor);--fdMessageStrip_Text_Color:var(--sapIndicationColor_10_TextColor);--fdMessageStrip_Border_Color:var(--sapIndicationColor_10_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_10_Background)}.fd-message-strip--indication-color-1b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_1);--fdMessageStrip_Text_Color:var(--sapIndicationColor_1);--fdMessageStrip_Border_Color:var(--sapIndicationColor_1b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_1b)}.fd-message-strip--indication-color-2b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_2);--fdMessageStrip_Text_Color:var(--sapIndicationColor_2);--fdMessageStrip_Border_Color:var(--sapIndicationColor_2b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_2b)}.fd-message-strip--indication-color-3b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_3);--fdMessageStrip_Text_Color:var(--sapIndicationColor_3);--fdMessageStrip_Border_Color:var(--sapIndicationColor_3b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_3b)}.fd-message-strip--indication-color-4b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_4);--fdMessageStrip_Text_Color:var(--sapIndicationColor_4);--fdMessageStrip_Border_Color:var(--sapIndicationColor_4b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_4b)}.fd-message-strip--indication-color-5b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_5);--fdMessageStrip_Text_Color:var(--sapIndicationColor_5);--fdMessageStrip_Border_Color:var(--sapIndicationColor_5b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_5b)}.fd-message-strip--indication-color-6b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_6);--fdMessageStrip_Text_Color:var(--sapIndicationColor_6);--fdMessageStrip_Border_Color:var(--sapIndicationColor_6b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_6b)}.fd-message-strip--indication-color-7b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_7);--fdMessageStrip_Text_Color:var(--sapIndicationColor_7);--fdMessageStrip_Border_Color:var(--sapIndicationColor_7b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_7b)}.fd-message-strip--indication-color-8b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_8);--fdMessageStrip_Text_Color:var(--sapIndicationColor_8);--fdMessageStrip_Border_Color:var(--sapIndicationColor_8b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_8b)}.fd-message-strip--indication-color-9b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_9);--fdMessageStrip_Text_Color:var(--sapIndicationColor_9);--fdMessageStrip_Border_Color:var(--sapIndicationColor_9b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_9b)}.fd-message-strip--indication-color-10b{--fdMessageStrip_Icon_Color:var(--sapIndicationColor_10);--fdMessageStrip_Text_Color:var(--sapIndicationColor_10);--fdMessageStrip_Border_Color:var(--sapIndicationColor_10b_BorderColor);--fdMessageStrip_Background_Color:var(--sapIndicationColor_10b)}.fd-message-strip,.fd-has-display-block{display:block}.fd-has-display-none{display:none}.fd-message-strip__sr-only{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-user-select:none;user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0px}\n/*! Bundled license information:\n\nfundamental-styles/dist/message-strip.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: () => [], propDecorators: { dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], dismissBtnTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissBtnTitle", required: false }] }], noIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "noIcon", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], marginBottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "marginBottom", required: false }] }], indicationColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "indicationColor", required: false }] }], onDismiss: [{ type: i0.Output, args: ["onDismiss"] }], icon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MessageStripIconDirective), { isSignal: true }] }] } });

class AutoDismissMessageStripDirective {
    constructor() {
        /** Whether the message strip is dismissible */
        this.dismissible = input(true, { ...(ngDevMode ? { debugName: "dismissible" } : {}), transform: booleanAttribute });
        /** Whether the alert should be automatically dismissed. */
        this.autoDismiss = input(true, { ...(ngDevMode ? { debugName: "autoDismiss" } : {}), transform: booleanAttribute });
        /** Duration of time *in milliseconds* that the alert will be visible. Set to -1 for indefinite. */
        this.duration = input(10000, ...(ngDevMode ? [{ debugName: "duration" }] : []));
        /** Whether the alert should stay open if the mouse is hovering over it. */
        this.mousePersist = input(false, { ...(ngDevMode ? { debugName: "mousePersist" } : {}), transform: booleanAttribute });
        /**
         * Whether the message strip is currently opened.
         * @hidden
         */
        this._opened = signal(false, ...(ngDevMode ? [{ debugName: "_opened" }] : []));
        /** @hidden */
        this._messageStripComponent = inject(MessageStripComponent, { optional: false, host: true });
        /** @hidden */
        this._onDismiss$ = outputToObservable(this._messageStripComponent.onDismiss);
        /** @hidden */
        this._elementRef = inject(ElementRef);
        /** @hidden */
        this._destroyRef = inject(DestroyRef);
    }
    /**
     * Gets observable tracking mouse hover state.
     * Lazily initialized to ensure ElementRef is available.
     * @hidden
     */
    get _mouseIn() {
        if (!this._mouseIn$) {
            this._mouseIn$ = merge(fromEvent(this._elementRef.nativeElement, 'mouseenter').pipe(map(() => true)), fromEvent(this._elementRef.nativeElement, 'mouseleave').pipe(map(() => false))).pipe(startWith(false));
        }
        return this._mouseIn$;
    }
    /**
     * Opens the message strip and starts auto-dismiss timer if configured.
     * This method is part of the public API via exportAs.
     */
    open() {
        this._opened.set(true);
        this._elementRef.nativeElement.classList.remove('fd-has-display-block');
        this._elementRef.nativeElement.classList.remove('fd-has-display-none');
        this._stopAutoDismiss();
        if (this.autoDismiss() && !this.dismissible() && isDevMode()) {
            console.warn('Auto dismiss is enabled but the message strip is not dismissible. Please set the dismissible input to true.');
        }
        if (this.autoDismiss() && this.dismissible()) {
            this._startAutoDismiss();
        }
    }
    /** @hidden */
    _stopAutoDismiss() {
        if (this._autoDismissTimeout) {
            clearTimeout(this._autoDismissTimeout);
            this._autoDismissTimeout = undefined;
        }
    }
    /** @hidden */
    _startAutoDismiss() {
        const startAutoDismissTimer$ = new Observable((res) => {
            this._autoDismissTimeout = setTimeout(() => {
                this._dismiss();
                res.next(null);
            }, this.duration());
            return () => this._stopAutoDismiss();
        });
        if (this.duration() > -1) {
            const source$ = this.mousePersist()
                ? this._mouseIn.pipe(switchMap((mouseIn) => {
                    if (mouseIn) {
                        return of(null);
                    }
                    return startAutoDismissTimer$;
                }))
                : startAutoDismissTimer$;
            source$.pipe(takeUntil(merge(destroyObservable(this._destroyRef), this._onDismiss$))).subscribe();
        }
    }
    /** @hidden */
    _dismiss() {
        this._messageStripComponent.dismiss();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AutoDismissMessageStripDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.0", type: AutoDismissMessageStripDirective, isStandalone: true, selector: "fd-message-strip[mousePersist], fd-message-strip[duration], fd-message-strip[autoDismiss]", inputs: { dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, autoDismiss: { classPropertyName: "autoDismiss", publicName: "autoDismiss", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, mousePersist: { classPropertyName: "mousePersist", publicName: "mousePersist", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "!_opened() ? \"none\" : null" } }, exportAs: ["fdAutoDismissMessageStrip"], ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AutoDismissMessageStripDirective, decorators: [{
            type: Directive,
            args: [{
                    // eslint-disable-next-line @angular-eslint/directive-selector
                    selector: 'fd-message-strip[mousePersist], fd-message-strip[duration], fd-message-strip[autoDismiss]',
                    exportAs: 'fdAutoDismissMessageStrip',
                    standalone: true,
                    host: {
                        '[style.display]': '!_opened() ? "none" : null'
                    }
                }]
        }], propDecorators: { dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], autoDismiss: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoDismiss", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], mousePersist: [{ type: i0.Input, args: [{ isSignal: true, alias: "mousePersist", required: false }] }] } });

/**
 * The wrapper component, which is wrapping the Message Strip and passes
 * configuration to it, also generates the content which will appear in it.
 */
class MessageStripAlertComponent {
    /** @hidden */
    constructor() {
        /** @hidden */
        this.autoDismissMessageStripDirective = viewChild.required(AutoDismissMessageStripDirective);
        /** User provided data. Full of it */
        this.data = inject(MessageStripAlertComponentData);
        /**
         * Reference to the message strip alert, which is used to close it from the outside, or access the data and/or the component instance
         *  */
        this.alertRef = inject(MessageStripAlertRef);
        /** @hidden */
        this._viewContainerRef = inject(ViewContainerRef);
        /** @hidden */
        this._renderer2 = inject(Renderer2);
        /** @hidden */
        this._destroyRef = inject(DestroyRef);
        this.messageStripConfig = this.data.messageStripConfig;
        this.contentPortal = this._getPortal(this.data.content);
        if (this.data.closeOnNavigation) {
            inject(Router, { optional: true })
                ?.events.pipe(filter((event) => event instanceof NavigationStart), takeUntilDestroyed())
                .subscribe(() => this.onDismissHandler());
        }
        // Open message strip after view initialization
        afterNextRender(() => {
            this.autoDismissMessageStripDirective().open();
        });
        // Cleanup timeout on destroy
        this._destroyRef.onDestroy(() => {
            if (this._autoDismissTimeout) {
                clearTimeout(this._autoDismissTimeout);
            }
        });
    }
    /**
     * Handler for the dismiss button click.
     *  */
    onDismissHandler() {
        this.messageStripConfig.onDismiss();
    }
    /**
     * Method, which is responsible for generating the portal, which will be rendered inside the message strip.
     * It can be any type of the portal, depending on the user provided content.
     *  */
    _getPortal(content) {
        if (typeof content === 'string') {
            const textEl = this._renderer2.createText(content);
            this._renderer2.appendChild(this._viewContainerRef.element.nativeElement, textEl);
            return new DomPortal(textEl);
        }
        if (content instanceof TemplateRef) {
            return new TemplatePortal(content, this._viewContainerRef, { $implicit: this.alertRef });
        }
        return new ComponentPortal(content);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.0", type: MessageStripAlertComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "autoDismissMessageStripDirective", first: true, predicate: AutoDismissMessageStripDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<fd-message-strip\n    [class]=\"messageStripConfig.class\"\n    [dismissible]=\"messageStripConfig.dismissible\"\n    [autoDismiss]=\"messageStripConfig.duration > 0\"\n    [mousePersist]=\"messageStripConfig.mousePersist\"\n    [duration]=\"messageStripConfig.duration\"\n    [noIcon]=\"messageStripConfig.noIcon\"\n    [type]=\"messageStripConfig.type\"\n    [id]=\"messageStripConfig.id\"\n    [ariaLabelledBy]=\"messageStripConfig.ariaLabelledBy\"\n    [ariaLabel]=\"messageStripConfig.ariaLabel\"\n    (onDismiss)=\"onDismissHandler()\"\n>\n    <ng-template [cdkPortalOutlet]=\"contentPortal\"></ng-template>\n</fd-message-strip>\n", dependencies: [{ kind: "component", type: MessageStripComponent, selector: "fd-message-strip", inputs: ["dismissible", "ariaLabelledBy", "dismissBtnTitle", "noIcon", "type", "id", "ariaLabel", "width", "minWidth", "marginBottom", "indicationColor"], outputs: ["onDismiss"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: AutoDismissMessageStripDirective, selector: "fd-message-strip[mousePersist], fd-message-strip[duration], fd-message-strip[autoDismiss]", inputs: ["dismissible", "autoDismiss", "duration", "mousePersist"], exportAs: ["fdAutoDismissMessageStrip"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertComponent, decorators: [{
            type: Component,
            args: [{ imports: [MessageStripComponent, PortalModule, AutoDismissMessageStripDirective], template: "<fd-message-strip\n    [class]=\"messageStripConfig.class\"\n    [dismissible]=\"messageStripConfig.dismissible\"\n    [autoDismiss]=\"messageStripConfig.duration > 0\"\n    [mousePersist]=\"messageStripConfig.mousePersist\"\n    [duration]=\"messageStripConfig.duration\"\n    [noIcon]=\"messageStripConfig.noIcon\"\n    [type]=\"messageStripConfig.type\"\n    [id]=\"messageStripConfig.id\"\n    [ariaLabelledBy]=\"messageStripConfig.ariaLabelledBy\"\n    [ariaLabel]=\"messageStripConfig.ariaLabel\"\n    (onDismiss)=\"onDismissHandler()\"\n>\n    <ng-template [cdkPortalOutlet]=\"contentPortal\"></ng-template>\n</fd-message-strip>\n" }]
        }], ctorParameters: () => [], propDecorators: { autoDismissMessageStripDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AutoDismissMessageStripDirective), { isSignal: true }] }] } });

/**
 * Service that is responsible for opening and closing message strip alerts.
 * This should be only created once in entire application.
 * Service is responsible for creating and managing the overlays for the
 * message strip alerts. This also manages the footer components for any
 * given position.
 */
class MessageStripAlertService {
    /** @hidden */
    constructor() {
        /** @hidden */
        this._injector = inject(Injector);
        /** @hidden */
        this._overlay = inject(Overlay);
        /** @hidden */
        this._viewportSize$ = inject(ViewportSizeObservable);
        /** @hidden */
        this._messageStripAlertService = inject(MessageStripAlertService, { optional: true, skipSelf: true });
        /**
         * Signal holding all message alerts
         * @hidden
         */
        this._messageAlerts = signal([], ...(ngDevMode ? [{ debugName: "_messageAlerts" }] : []));
        /** @hidden */
        this._overlayRefs = {};
        /**
         * Signal holding footer components
         * @hidden
         */
        this._messageStripAlertContainerFooters = signal({}, ...(ngDevMode ? [{ debugName: "_messageStripAlertContainerFooters" }] : []));
        if (this._messageStripAlertService) {
            throw new Error('MessageStripAlertService is already provided');
        }
        this.footerComponents$ = toObservable(this._messageStripAlertContainerFooters);
        this._listenToItemsChanges();
    }
    /**
     * Set the footer component for a given position.
     * @param position - The position where the footer should be displayed
     * @param component - The component type to be rendered as footer
     */
    setFooterComponent(position, component) {
        this._messageStripAlertContainerFooters.update((footers) => ({
            ...footers,
            [position]: component
        }));
    }
    /**
     * Open a message strip alert with given configuration.
     * @param c - Configuration for the message strip alert
     * @returns Reference to the opened alert for programmatic control
     */
    open(c) {
        const config = applyDefaultConfig(c);
        const alertRef = this._getMessageStripAlertRef(config);
        this._messageAlerts.update((alerts) => [{ ...config, portal: alertRef.portal }, ...alerts]);
        return alertRef;
    }
    /** @hidden */
    _getMessageStripAlertRef(config) {
        const onDismiss$ = new Subject();
        const alertRef = {
            portal: new ComponentPortal((MessageStripAlertComponent), null, Injector.create({
                providers: [
                    {
                        provide: MessageStripAlertComponentData,
                        useValue: {
                            content: config.content,
                            closeOnNavigation: config.closeOnNavigation,
                            messageStripConfig: {
                                ...config.messageStrip,
                                onDismiss: () => {
                                    this._messageAlerts.update((alerts) => alerts.filter((item) => item.portal !== alertRef.portal));
                                    config.messageStrip &&
                                        config.messageStrip.onDismiss &&
                                        config.messageStrip.onDismiss();
                                    onDismiss$.next();
                                    onDismiss$.complete();
                                }
                            }
                        }
                    },
                    {
                        provide: MessageStripAlertRef,
                        useFactory: () => alertRef
                    },
                    patchLanguage((lang) => ({
                        coreMessageStrip: {
                            dismissLabel: config.messageStrip.dismissLabel || lang.coreMessageStrip.dismissLabel
                        }
                    }))
                ],
                parent: this._injector
            })),
            dismiss: () => {
                this._messageAlerts.update((alerts) => alerts.filter((item) => item.portal !== alertRef.portal));
                config.messageStrip && config.messageStrip.onDismiss && config.messageStrip.onDismiss();
                onDismiss$.next();
                onDismiss$.complete();
            },
            onDismiss$: onDismiss$.asObservable()
        };
        return alertRef;
    }
    /** @hidden */
    _listenToItemsChanges() {
        combineLatest([this._viewportSize$, toObservable(this._messageAlerts)])
            .pipe(map(([viewportSize, messageAlerts]) => {
            if (viewportSize < ResponsiveBreakpoints.M) {
                return messageAlerts.reduce((acc, next) => {
                    const position = next.position?.startsWith('top') ? 'top-middle' : 'bottom-middle';
                    acc[position] = [...(acc[position] || []), next.portal];
                    return acc;
                }, {});
            }
            return messageAlerts.reduce((acc, next) => {
                acc[next.position] = [...(acc[next.position] || []), next.portal];
                return acc;
            }, {});
        }), tap((messageAlertsByPosition) => {
            let topSectionIsOpened = false;
            let bottomSectionIsOpened = false;
            Object.entries(messageAlertsByPosition).forEach(([position, portals]) => {
                topSectionIsOpened = topSectionIsOpened || position.startsWith('top');
                bottomSectionIsOpened = bottomSectionIsOpened || position.startsWith('bottom');
                const { containerRef } = this._getOverlayRef(position);
                containerRef.instance.attachedElements.set(portals);
            });
            this._syncExistingOverlays(messageAlertsByPosition, bottomSectionIsOpened, topSectionIsOpened);
        }))
            .subscribe();
    }
    /**
     * Synchronizes existing overlay states based on current message alerts.
     * @hidden
     */
    _syncExistingOverlays(messageAlertsByPosition, bottomSectionIsOpened, topSectionIsOpened) {
        Object.keys(this._overlayRefs).forEach((position) => {
            const overlayRef = this._overlayRefs[position];
            if (!overlayRef) {
                return;
            }
            if (!messageAlertsByPosition[position]) {
                overlayRef.ref.dispose();
                delete this._overlayRefs[position];
            }
            else {
                const ref = overlayRef.ref;
                if (position.startsWith('top')) {
                    if (bottomSectionIsOpened) {
                        ref.overlayElement.classList.add('fd-message-strip-alert-overlay--bottom-opened');
                    }
                    else {
                        ref.overlayElement.classList.remove('fd-message-strip-alert-overlay--bottom-opened');
                    }
                }
                if (position.startsWith('bottom')) {
                    if (topSectionIsOpened) {
                        ref.overlayElement.classList.add('fd-message-strip-alert-overlay--top-opened');
                    }
                    else {
                        ref.overlayElement.classList.remove('fd-message-strip-alert-overlay--top-opened');
                    }
                }
            }
        });
    }
    /**
     * Gets or creates an overlay reference for the specified position.
     * @hidden
     */
    _getOverlayRef(position) {
        if (!this._overlayRefs[position]) {
            const [verticalPosition, horizontalPosition] = position.split('-');
            const overlayRef = this._createOverlay(verticalPosition, horizontalPosition);
            const containerRef = overlayRef.attach(new ComponentPortal(MessageStripAlertContainerComponent, null, Injector.create({
                parent: this._injector,
                providers: [
                    {
                        provide: MessageStripAlertContainerPosition,
                        useValue: position
                    }
                ]
            })));
            this._overlayRefs[position] = { ref: overlayRef, containerRef };
        }
        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
        return this._overlayRefs[position];
    }
    /**
     * Creates an overlay for message strip alerts at the specified position.
     * @hidden
     */
    _createOverlay(verticalPosition, horizontalPosition) {
        return this._overlay.create({
            panelClass: [
                'fd-message-strip-alert-overlay',
                `fd-message-strip-alert-overlay--${verticalPosition}`,
                `fd-message-strip-alert-overlay--${horizontalPosition}`
            ],
            hasBackdrop: false
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MessageStripAlertService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root'
                }]
        }], ctorParameters: () => [] });

const messageStripIndicationColors = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
const _messageStripIndicationColors = messageStripIndicationColors.reduce((acc, item) => {
    acc.push(item);
    acc.push(`${item}b`);
    return acc;
}, []);

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

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

export { AutoDismissMessageStripDirective, MessageStripAlertContainerAlertRefs, MessageStripAlertContainerPosition, MessageStripAlertRef, MessageStripAlertService, MessageStripComponent, MessageStripIconDirective, MessageStripModule, _messageStripIndicationColors };
//# sourceMappingURL=fundamental-ngx-core-message-strip.mjs.map
