import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';
import * as i2 from '@agorapulse/ui-symbol';
import { apClose, apSingleChatBubble, apRoundedCheckFill, apErrorFill, SymbolComponent } from '@agorapulse/ui-symbol';
import { trigger, transition, style, animate } from '@angular/animations';
import { AsyncPipe } from '@angular/common';
import * as i0 from '@angular/core';
import { SecurityContext, Injectable, ChangeDetectionStrategy, Component } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import * as i1 from '@angular/platform-browser';
import * as i3 from '@angular/router';

const snackbarTypesMap = {
    0: 'info',
    1: 'success',
    2: 'warning',
    3: 'error',
};
const snackbarIconsMap = {
    0: 'single-chat-bubble',
    1: 'rounded-check_fill',
    2: 'error_fill',
    3: 'error_fill',
};

class SnackbarsThreadService {
    domSanitizer;
    _list = [];
    snackbarList = new BehaviorSubject([]);
    constructor(domSanitizer) {
        this.domSanitizer = domSanitizer;
    }
    _emit() {
        this.snackbarList.next(this._list);
    }
    add(elem, timeout = 5000) {
        const notification = {
            actionName: elem.actionName,
            navigateInternalUrl: elem.navigateInternalUrl,
            id: Math.random().toString(36).substring(7) + Date.now().toString(),
            snackbarType: elem.snackbarType,
            snackbarText: this.domSanitizer.sanitize(SecurityContext.HTML, elem.snackbarText) ?? '',
            openUrlInNewTab: elem.openUrlInNewTab,
            callback: elem.callback
        };
        this._list.push(notification);
        this._emit();
        if (timeout > 0) {
            setTimeout(() => this.remove(notification.id), timeout);
        }
    }
    remove(id) {
        if (!id) {
            return;
        }
        const index = this._list.findIndex(el => el.id === id);
        index > -1 && this._list.splice(index, 1);
        this._emit();
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SnackbarsThreadService, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SnackbarsThreadService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SnackbarsThreadService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: () => [{ type: i1.DomSanitizer }] });

class SnackbarsThreadComponent {
    snackbarsThreadService;
    symbolRegistry;
    router;
    SnackbarTypesMap = snackbarTypesMap;
    SnackbarIconsMap = snackbarIconsMap;
    constructor(snackbarsThreadService, symbolRegistry, router) {
        this.snackbarsThreadService = snackbarsThreadService;
        this.symbolRegistry = symbolRegistry;
        this.router = router;
        this.symbolRegistry.registerSymbols([apClose, apSingleChatBubble, apRoundedCheckFill, apErrorFill, apClose]);
    }
    remove(id) {
        this.snackbarsThreadService.remove(id);
    }
    onActionClick(snackbar, id) {
        const { navigateInternalUrl, openUrlInNewTab, callback } = snackbar;
        if (callback) {
            this.snackbarsThreadService.remove(id);
            callback();
            return;
        }
        if (openUrlInNewTab && navigateInternalUrl) {
            window.open(navigateInternalUrl, '_blank');
        }
        else {
            this.snackbarsThreadService.remove(id);
            if (navigateInternalUrl) {
                this.router.navigateByUrl(navigateInternalUrl);
            }
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SnackbarsThreadComponent, deps: [{ token: SnackbarsThreadService }, { token: i2.SymbolRegistry }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: SnackbarsThreadComponent, isStandalone: true, selector: "ap-snackbars-thread", ngImport: i0, template: "<div class=\"thread-container\">\n    @for (el of snackbarsThreadService.snackbarList | async; track el) {\n        <div\n            @fadeAnimation\n            class=\"item {{ SnackbarTypesMap[el.snackbarType] }}\">\n            <div class=\"left\">\n                <div class=\"icon {{ SnackbarTypesMap[el.snackbarType] }}\">\n                    <ap-symbol\n                        size=\"sm\"\n                        [attr.aria-label]=\"SnackbarTypesMap[el.snackbarType]\"\n                        [symbolId]=\"SnackbarIconsMap[el.snackbarType]\" />\n                </div>\n                <div class=\"text\">\n                    <div [innerHTML]=\"el.snackbarText\"></div>\n                </div>\n            </div>\n            <div class=\"right\">\n                @if ((el.navigateInternalUrl?.length || el.callback) && el.actionName?.length) {\n                    <a\n                        class=\"standalone link\"\n                        role=\"link\"\n                        tabindex=\"0\"\n                        (click)=\"onActionClick(el, el.id)\"\n                        (keyup)=\"onActionClick(el, el.id)\">\n                        {{ el.actionName }}\n                    </a>\n                }\n                <ap-close-button (closed)=\"remove(el.id)\" />\n            </div>\n        </div>\n    }\n</div>\n", styles: ["[color=facebook]{color:#0866ff}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#0866ff}[border=facebook]{border:1px solid #0866ff}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=reddit]{color:#ff4500}[bgcolor=reddit],[hcolor=reddit]:hover{background-color:#ff4500}[border=reddit]{border:1px solid #ff4500}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #a566a5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #c7ab82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #f2713c}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #ffd006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94c5aa}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2a9d8f}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78acd8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525a9e}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6a2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729e}.thread-container{position:absolute;top:68px;right:var(--ref-spacing-lg);width:var(--comp-snackbar-width);z-index:999999999;gap:var(--comp-snackbar-spacing);display:flex;flex-direction:column}.thread-container .item{align-items:center;height:auto;padding:var(--comp-snackbar-padding-vertical) var(--comp-snackbar-padding-horizontal);box-sizing:border-box;box-shadow:var(--comp-snackbar-shadow);border-radius:var(--comp-snackbar-border-radius);display:flex;flex-direction:row;justify-content:space-between;gap:var(--comp-snackbar-spacing)}.thread-container .item.success{background-color:var(--comp-snackbar-success-background-color)}.thread-container .item.error{background-color:var(--comp-snackbar-error-background-color)}.thread-container .item .left,.thread-container .item .right{display:flex;gap:var(--comp-snackbar-spacing)}.thread-container .item .left .icon{display:flex;justify-content:center;align-items:center}.thread-container .item .left .icon.success{color:var(--comp-snackbar-success-icon-color)}.thread-container .item .left .icon.error{color:var(--comp-snackbar-error-icon-color)}.thread-container .item .left .text{width:auto;display:flex;font-family:var(--comp-snackbar-text-style-font-family);font-size:var(--comp-snackbar-text-style-size);font-weight:var(--comp-snackbar-text-style-font-weight);line-height:var(--comp-snackbar-text-style-line-height);justify-content:flex-start;align-items:center;overflow-wrap:anywhere;color:var(--comp-snackbar-text-color)}.thread-container .item .right .link{width:max-content}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: CloseButtonComponent, selector: "ap-close-button", inputs: ["disabled", "ariaLabel", "dataTest"], outputs: ["closed"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [
            trigger('fadeAnimation', [
                transition(':enter', [
                    style({
                        height: 0,
                        minHeight: 0,
                        opacity: 0,
                        transform: 'translateY(25%)',
                        padding: 0,
                    }),
                    // padding and min-height should be the same as in scss file
                    animate('300ms ease-in', style({
                        height: '*',
                        minHeight: '*',
                        padding: 'var(--comp-snackbar-padding-vertical) var(--comp-snackbar-padding-horizontal)',
                    })),
                    animate('200ms ease-in', style({ opacity: 0.5, transform: 'translateY(0%)' })),
                    animate('200ms ease-in', style({ opacity: 1 })),
                ]),
                transition(':leave', [
                    animate('300ms ease-out', style({ opacity: 0.0, transform: 'translateY(-5%)' })),
                    animate('300ms ease-out', style({ height: 0, minHeight: 0, position: 'fixed' })),
                ]),
            ]),
        ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SnackbarsThreadComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ap-snackbars-thread', imports: [SymbolComponent, AsyncPipe, CloseButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
                        trigger('fadeAnimation', [
                            transition(':enter', [
                                style({
                                    height: 0,
                                    minHeight: 0,
                                    opacity: 0,
                                    transform: 'translateY(25%)',
                                    padding: 0,
                                }),
                                // padding and min-height should be the same as in scss file
                                animate('300ms ease-in', style({
                                    height: '*',
                                    minHeight: '*',
                                    padding: 'var(--comp-snackbar-padding-vertical) var(--comp-snackbar-padding-horizontal)',
                                })),
                                animate('200ms ease-in', style({ opacity: 0.5, transform: 'translateY(0%)' })),
                                animate('200ms ease-in', style({ opacity: 1 })),
                            ]),
                            transition(':leave', [
                                animate('300ms ease-out', style({ opacity: 0.0, transform: 'translateY(-5%)' })),
                                animate('300ms ease-out', style({ height: 0, minHeight: 0, position: 'fixed' })),
                            ]),
                        ]),
                    ], template: "<div class=\"thread-container\">\n    @for (el of snackbarsThreadService.snackbarList | async; track el) {\n        <div\n            @fadeAnimation\n            class=\"item {{ SnackbarTypesMap[el.snackbarType] }}\">\n            <div class=\"left\">\n                <div class=\"icon {{ SnackbarTypesMap[el.snackbarType] }}\">\n                    <ap-symbol\n                        size=\"sm\"\n                        [attr.aria-label]=\"SnackbarTypesMap[el.snackbarType]\"\n                        [symbolId]=\"SnackbarIconsMap[el.snackbarType]\" />\n                </div>\n                <div class=\"text\">\n                    <div [innerHTML]=\"el.snackbarText\"></div>\n                </div>\n            </div>\n            <div class=\"right\">\n                @if ((el.navigateInternalUrl?.length || el.callback) && el.actionName?.length) {\n                    <a\n                        class=\"standalone link\"\n                        role=\"link\"\n                        tabindex=\"0\"\n                        (click)=\"onActionClick(el, el.id)\"\n                        (keyup)=\"onActionClick(el, el.id)\">\n                        {{ el.actionName }}\n                    </a>\n                }\n                <ap-close-button (closed)=\"remove(el.id)\" />\n            </div>\n        </div>\n    }\n</div>\n", styles: ["[color=facebook]{color:#0866ff}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#0866ff}[border=facebook]{border:1px solid #0866ff}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=reddit]{color:#ff4500}[bgcolor=reddit],[hcolor=reddit]:hover{background-color:#ff4500}[border=reddit]{border:1px solid #ff4500}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #a566a5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #c7ab82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #f2713c}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #ffd006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94c5aa}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2a9d8f}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78acd8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525a9e}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6a2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729e}.thread-container{position:absolute;top:68px;right:var(--ref-spacing-lg);width:var(--comp-snackbar-width);z-index:999999999;gap:var(--comp-snackbar-spacing);display:flex;flex-direction:column}.thread-container .item{align-items:center;height:auto;padding:var(--comp-snackbar-padding-vertical) var(--comp-snackbar-padding-horizontal);box-sizing:border-box;box-shadow:var(--comp-snackbar-shadow);border-radius:var(--comp-snackbar-border-radius);display:flex;flex-direction:row;justify-content:space-between;gap:var(--comp-snackbar-spacing)}.thread-container .item.success{background-color:var(--comp-snackbar-success-background-color)}.thread-container .item.error{background-color:var(--comp-snackbar-error-background-color)}.thread-container .item .left,.thread-container .item .right{display:flex;gap:var(--comp-snackbar-spacing)}.thread-container .item .left .icon{display:flex;justify-content:center;align-items:center}.thread-container .item .left .icon.success{color:var(--comp-snackbar-success-icon-color)}.thread-container .item .left .icon.error{color:var(--comp-snackbar-error-icon-color)}.thread-container .item .left .text{width:auto;display:flex;font-family:var(--comp-snackbar-text-style-font-family);font-size:var(--comp-snackbar-text-style-size);font-weight:var(--comp-snackbar-text-style-font-weight);line-height:var(--comp-snackbar-text-style-line-height);justify-content:flex-start;align-items:center;overflow-wrap:anywhere;color:var(--comp-snackbar-text-color)}.thread-container .item .right .link{width:max-content}\n"] }]
        }], ctorParameters: () => [{ type: SnackbarsThreadService }, { type: i2.SymbolRegistry }, { type: i3.Router }] });

/**
 * We use enum to avoid problem with isolatedModules when export const enum
 * https://ncjamieson.com/dont-export-const-enums/
 */
var SnackbarTypeValues;
(function (SnackbarTypeValues) {
    SnackbarTypeValues["INFO"] = "info";
    SnackbarTypeValues["SUCCESS"] = "success";
    SnackbarTypeValues["WARNING"] = "warning";
    SnackbarTypeValues["ERROR"] = "error";
})(SnackbarTypeValues || (SnackbarTypeValues = {}));
class CodeStatus {
    snackbarText;
    snackbarType;
    constructor(snackbarText, snackbarType) {
        this.snackbarText = snackbarText;
        this.snackbarType = snackbarType;
    }
}
class CodeStatusSuccess extends CodeStatus {
    constructor(snackbarText) {
        super(snackbarText, 1);
    }
}
class CodeStatusError extends CodeStatus {
    constructor(snackbarText) {
        super(snackbarText, 3);
    }
}
function generateCodeStatus(text, type) {
    switch (type) {
        case 'info':
            return new CodeStatusSuccess(text);
        case 'success':
            return new CodeStatusSuccess(text);
        case 'warning':
            return new CodeStatusError(text);
        case 'error':
            return new CodeStatusError(text);
        default:
            return new CodeStatusSuccess(text);
    }
}

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

export { CodeStatus, SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService, generateCodeStatus };
//# sourceMappingURL=agorapulse-ui-components-snackbars-thread.mjs.map
