/* eslint-disable @typescript-eslint/member-ordering */
import { ChangeDetectionStrategy, Component, computed, Directive, ElementRef, inject, Input, ViewEncapsulation, } from '@angular/core';
import { TUI_PLATFORM } from '@taiga-ui/cdk/tokens';
import { tuiDirectiveBinding, tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components';
import { TuiWithIcons } from '@taiga-ui/core/directives/icons';
import { TUI_COMMON_ICONS, TUI_ICON_END } from '@taiga-ui/core/tokens';
import { tuiAvatarOptionsProvider } from '@taiga-ui/kit/components/avatar';
import { tuiBadgeOptionsProvider } from '@taiga-ui/kit/components/badge';
import { TuiShrinkWrapDirective } from '@taiga-ui/kit/components/shrink-wrap';
import * as i0 from "@angular/core";
import * as i1 from "@taiga-ui/core/directives/icons";
import * as i2 from "@taiga-ui/kit/components/shrink-wrap";
class TuiToastStyles {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiToastStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiToastStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-toast" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiToast]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;grid-row:1 / span 2;box-sizing:border-box;gap:.75rem;color:var(--tui-text-primary);background:var(--tui-background-elevation-3);min-block-size:3.5rem;border-radius:1rem;padding:.75rem 1rem;box-shadow:var(--tui-shadow-medium);align-items:center;justify-content:center;inline-size:-webkit-max-content;inline-size:max-content;font:var(--tui-font-text-ui-s);max-inline-size:min(calc(100vw - 2rem),25rem);border:inherit;text-decoration:none;white-space:pre-line;text-align:start;overflow:hidden}[tuiToast]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiToast]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiToast]>*:not(tui-shrink-wrap),[tuiToast]:after,[tuiToast]:before{max-inline-size:50%;margin:0 -.25rem}[tuiToast]:after{font-size:1rem;color:var(--tui-text-tertiary)}[tuiToast] tui-avatar{margin-inline-end:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiToastStyles, decorators: [{
            type: Component,
            args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        class: 'tui-toast',
                    }, styles: ["[tuiToast]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;grid-row:1 / span 2;box-sizing:border-box;gap:.75rem;color:var(--tui-text-primary);background:var(--tui-background-elevation-3);min-block-size:3.5rem;border-radius:1rem;padding:.75rem 1rem;box-shadow:var(--tui-shadow-medium);align-items:center;justify-content:center;inline-size:-webkit-max-content;inline-size:max-content;font:var(--tui-font-text-ui-s);max-inline-size:min(calc(100vw - 2rem),25rem);border:inherit;text-decoration:none;white-space:pre-line;text-align:start;overflow:hidden}[tuiToast]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiToast]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiToast]>*:not(tui-shrink-wrap),[tuiToast]:after,[tuiToast]:before{max-inline-size:50%;margin:0 -.25rem}[tuiToast]:after{font-size:1rem;color:var(--tui-text-tertiary)}[tuiToast] tui-avatar{margin-inline-end:0}\n"] }]
        }] });
class TuiToastDirective {
    constructor() {
        this.tuiShrinkWrap = 'min(calc(100vw - 2rem), 25rem)';
        this.nothing = tuiWithStyles(TuiToastStyles);
        this.width = tuiDirectiveBinding(TuiShrinkWrapDirective, 'tuiShrinkWrap', computed(() => this.tuiShrinkWrap));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiToastDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiToastDirective, isStandalone: true, selector: "[tuiToast]:not(ng-template)", inputs: { tuiShrinkWrap: "tuiShrinkWrap" }, providers: [
            tuiBadgeOptionsProvider({ size: 'l' }),
            tuiAvatarOptionsProvider(() => ({
                size: inject(TUI_PLATFORM) === 'web' ? 's' : 'm',
            })),
            tuiButtonOptionsProvider(() => ({
                size: 's',
                appearance: inject(TUI_PLATFORM) === 'web' ? 'secondary-grayscale' : 'secondary',
            })),
            {
                provide: TUI_ICON_END,
                useFactory: () => inject(ElementRef).nativeElement?.matches('a, button')
                    ? inject(TUI_COMMON_ICONS).more
                    : '',
            },
        ], hostDirectives: [{ directive: i1.TuiWithIcons }, { directive: i2.TuiShrinkWrapDirective, inputs: ["tuiShrinkWrap", "tuiShrinkWrap"] }], ngImport: i0 }); }
}
export { TuiToastDirective };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiToastDirective, decorators: [{
            type: Directive,
            args: [{
                    standalone: true,
                    selector: '[tuiToast]:not(ng-template)',
                    providers: [
                        tuiBadgeOptionsProvider({ size: 'l' }),
                        tuiAvatarOptionsProvider(() => ({
                            size: inject(TUI_PLATFORM) === 'web' ? 's' : 'm',
                        })),
                        tuiButtonOptionsProvider(() => ({
                            size: 's',
                            appearance: inject(TUI_PLATFORM) === 'web' ? 'secondary-grayscale' : 'secondary',
                        })),
                        {
                            provide: TUI_ICON_END,
                            useFactory: () => inject(ElementRef).nativeElement?.matches('a, button')
                                ? inject(TUI_COMMON_ICONS).more
                                : '',
                        },
                    ],
                    hostDirectives: [
                        TuiWithIcons,
                        {
                            directive: TuiShrinkWrapDirective,
                            inputs: ['tuiShrinkWrap'],
                        },
                    ],
                }]
        }], propDecorators: { tuiShrinkWrap: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 