import { ChangeDetectionStrategy, Component, Directive, Input, ViewEncapsulation, } from '@angular/core';
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
import * as i0 from "@angular/core";
class TuiFloatingContainerStyles {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFloatingContainerStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiFloatingContainerStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-floating-container" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiFloatingContainer]{transition-property:bottom;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:sticky;bottom:max(0px,calc(100 * var(--tui-viewport-svh) - var(--tui-viewport-height) - var(--tui-viewport-y)));bottom:max(0px,calc(100svh - var(--tui-viewport-height) - var(--tui-viewport-y)));z-index:1;margin-block-start:1rem;padding-block-end:max(1rem,env(safe-area-inset-bottom));text-align:center;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary)}[tuiFloatingContainer],[tuiFloatingContainer]>tui-elastic-container>.t-wrapper{display:flex;flex-direction:column;gap:.5rem}[tuiFloatingContainer]>*,[tuiFloatingContainer]>tui-elastic-container>.t-wrapper>*{inline-size:100%}[tuiFloatingContainer]:has(>*:only-child:not(tui-elastic-container)),[tuiFloatingContainer]:has(*.ng-animating:first-child~.ng-animating:last-child){padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}[tuiFloatingContainer]:before{top:0;left:0;bottom:0;right:0;transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:-1rem;right:-1rem;z-index:-1;background:var(--t-background, var(--tui-background-elevation-1));-webkit-mask-image:linear-gradient(180deg,transparent,black 2.5rem);mask-image:linear-gradient(180deg,transparent,black 2.5rem)}tui-sheet-dialog [tuiFloatingContainer]{margin-block-end:calc(-1*max(1.5rem,env(safe-area-inset-bottom)))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFloatingContainerStyles, decorators: [{
            type: Component,
            args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        class: 'tui-floating-container',
                    }, styles: ["[tuiFloatingContainer]{transition-property:bottom;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:sticky;bottom:max(0px,calc(100 * var(--tui-viewport-svh) - var(--tui-viewport-height) - var(--tui-viewport-y)));bottom:max(0px,calc(100svh - var(--tui-viewport-height) - var(--tui-viewport-y)));z-index:1;margin-block-start:1rem;padding-block-end:max(1rem,env(safe-area-inset-bottom));text-align:center;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary)}[tuiFloatingContainer],[tuiFloatingContainer]>tui-elastic-container>.t-wrapper{display:flex;flex-direction:column;gap:.5rem}[tuiFloatingContainer]>*,[tuiFloatingContainer]>tui-elastic-container>.t-wrapper>*{inline-size:100%}[tuiFloatingContainer]:has(>*:only-child:not(tui-elastic-container)),[tuiFloatingContainer]:has(*.ng-animating:first-child~.ng-animating:last-child){padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}[tuiFloatingContainer]:before{top:0;left:0;bottom:0;right:0;transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:-1rem;right:-1rem;z-index:-1;background:var(--t-background, var(--tui-background-elevation-1));-webkit-mask-image:linear-gradient(180deg,transparent,black 2.5rem);mask-image:linear-gradient(180deg,transparent,black 2.5rem)}tui-sheet-dialog [tuiFloatingContainer]{margin-block-end:calc(-1*max(1.5rem,env(safe-area-inset-bottom)))}\n"] }]
        }] });
class TuiFloatingContainer {
    constructor() {
        this.nothing = tuiWithStyles(TuiFloatingContainerStyles);
        this.background = '';
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFloatingContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiFloatingContainer, isStandalone: true, selector: "[tuiFloatingContainer]", inputs: { background: ["tuiFloatingContainer", "background"] }, host: { attributes: { "tuiFloatingContainer": "" }, properties: { "style.--t-background": "background" } }, ngImport: i0 }); }
}
export { TuiFloatingContainer };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiFloatingContainer, decorators: [{
            type: Directive,
            args: [{
                    standalone: true,
                    selector: '[tuiFloatingContainer]',
                    host: {
                        tuiFloatingContainer: '',
                        '[style.--t-background]': 'background',
                    },
                }]
        }], propDecorators: { background: [{
                type: Input,
                args: ['tuiFloatingContainer']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxvYXRpbmctY29udGFpbmVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tpdC9jb21wb25lbnRzL2Zsb2F0aW5nLWNvbnRhaW5lci9mbG9hdGluZy1jb250YWluZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDSCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFNBQVMsRUFDVCxLQUFLLEVBQ0wsaUJBQWlCLEdBQ3BCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBQyxhQUFhLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQzs7QUFFaEUsTUFVTSwwQkFBMEI7K0dBQTFCLDBCQUEwQjttR0FBMUIsMEJBQTBCLDRIQVJ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