import { ChangeDetectionStrategy, Component, Directive, EventEmitter, Inject, InjectionToken, Input, Optional, Output, ViewEncapsulation } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { Subject } from 'rxjs';
import { kbqPopoverAnimations } from './popover-animations';
import { KbqPopoverComponent, KbqPopoverTrigger } from './popover.component';
import * as i0 from "@angular/core";
import * as i1 from "@koobiq/components/button";
import * as i2 from "@angular/cdk/a11y";
import * as i3 from "@angular/common";
export const KBQ_POPOVER_CONFIRM_TEXT = new InjectionToken('');
export const KBQ_POPOVER_CONFIRM_BUTTON_TEXT = new InjectionToken('');
export class KbqPopoverConfirmComponent extends KbqPopoverComponent {
    constructor() {
        super(...arguments);
        this.onConfirm = new Subject();
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqPopoverConfirmComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: KbqPopoverConfirmComponent, selector: "kbq-popover-confirm-component", usesInheritance: true, ngImport: i0, template: "<div\n    cdkTrapFocus=\"true\"\n    cdkTrapFocusAutoCapture=\"true\"\n    class=\"kbq-popover-confirm kbq-popover\"\n    [ngClass]=\"classMap\"\n    [@state]=\"visibility\"\n    (@state.done)=\"animationDone($event)\"\n    (@state.start)=\"animationStart()\"\n>\n    <div class=\"kbq-popover__container\">\n        <div class=\"kbq-popover__content\">\n            <div>{{ confirmText }}</div>\n            <button kbq-button [color]=\"'contrast'\" (click)=\"onConfirm.next()\">\n                {{ confirmButtonText }}\n            </button>\n        </div>\n    </div>\n\n    <div class=\"kbq-popover__arrow\"></div>\n</div>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-popover{position:relative;border-radius:var(--kbq-popover-size-container-border-radius);box-sizing:border-box;list-style:none;white-space:pre-line;z-index:1}.kbq-popover.kbq-popover_small{max-width:var(--kbq-popover-size-container-width-small)}.kbq-popover.kbq-popover_small .kbq-popover__content{padding:var(--kbq-size-l)}.kbq-popover.kbq-popover_medium{max-width:var(--kbq-popover-size-container-width-medium)}.kbq-popover.kbq-popover_large{max-width:var(--kbq-popover-size-container-width-large)}.kbq-popover.kbq-popover_placement-top,.kbq-popover.kbq-popover_placement-top-left,.kbq-popover.kbq-popover_placement-top-right{margin-bottom:8px}.kbq-popover.kbq-popover_placement-right,.kbq-popover.kbq-popover_placement-right-top,.kbq-popover.kbq-popover_placement-right-bottom{margin-left:8px}.kbq-popover.kbq-popover_placement-bottom,.kbq-popover.kbq-popover_placement-bottom-left,.kbq-popover.kbq-popover_placement-bottom-right{margin-top:8px}.kbq-popover.kbq-popover_placement-left,.kbq-popover.kbq-popover_placement-left-top,.kbq-popover.kbq-popover_placement-left-bottom{margin-right:8px}.kbq-popover__content{overflow-y:auto}.kbq-popover__content.kbq-popover__content_default-paddings{padding:var(--kbq-popover-size-content-padding-top) var(--kbq-popover-size-content-padding-horizontal) var(--kbq-popover-size-content-padding-bottom)}.kbq-popover__container{overflow:hidden;display:flex;flex-direction:column;max-height:var(--kbq-popover-size-container-max-height);border-radius:var(--kbq-popover-size-container-border-radius)}.kbq-popover__container.kbq-popover__container_with-header .kbq-popover__content{padding-top:var(--kbq-size-s)}.kbq-popover__container.kbq-popover__container_with-footer .kbq-popover__content_default-paddings.kbq-popover__content{padding-bottom:var(--kbq-size-s)}.kbq-popover__content .kbq-popover__close-container{display:flex;justify-content:flex-end;height:0}.kbq-popover__content .kbq-popover__close-container .kbq-popover__close{top:auto;right:auto;transform:translateY(-50%) translate(50%)}.kbq-popover__header{display:flex;align-items:center;overflow:hidden}.kbq-popover__header .kbq-popover__header-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-popover__header.kbq-popover__header_default-paddings{padding:var(--kbq-popover-size-header-padding-top) var(--kbq-popover-size-header-padding-horizontal) var(--kbq-popover-size-header-padding-bottom) var(--kbq-popover-size-header-padding-horizontal)}.kbq-popover__header_top-overflow{position:relative;z-index:2;box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-popover__header_with-close-button{padding-right:var(--kbq-size-4xl)}.kbq-popover__footer.kbq-popover__footer_default-paddings{padding:var(--kbq-popover-size-footer-padding-vertical) var(--kbq-popover-size-footer-padding-horizontal)}.kbq-popover__footer_bottom-overflow{position:relative;z-index:2;box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-popover__arrow{position:absolute;z-index:-1;width:12px;height:12px;transform:rotate(45deg)}.kbq-popover_placement-top .kbq-popover__arrow{bottom:-5.5px;left:50%;margin-left:-5.5px}.kbq-popover_placement-top-left .kbq-popover__arrow{bottom:-5.5px;left:24px}.kbq-popover_placement-top-right .kbq-popover__arrow{bottom:-5.5px;right:24px}.kbq-popover_placement-right .kbq-popover__arrow{left:-5.5px;top:50%;margin-top:-5.5px}.kbq-popover_placement-right-top .kbq-popover__arrow{left:-5.5px;top:24px}.kbq-popover_placement-right-bottom .kbq-popover__arrow{left:-5.5px;bottom:24px}.kbq-popover_placement-left .kbq-popover__arrow{right:-5.5px;top:50%;margin-top:-5.5px}.kbq-popover_placement-left-top .kbq-popover__arrow{right:-5.5px;top:24px}.kbq-popover_placement-left-bottom .kbq-popover__arrow{right:-5.5px;bottom:24px}.kbq-popover_placement-bottom .kbq-popover__arrow{top:-5.5px;left:50%;margin-left:-5.5px}.kbq-popover_placement-bottom-left .kbq-popover__arrow{top:-5.5px;left:24px}.kbq-popover_placement-bottom-right .kbq-popover__arrow{top:-5.5px;right:24px}.kbq-popover__close{position:absolute;z-index:2;top:var(--kbq-size-s);right:var(--kbq-size-s);border-radius:var(--kbq-size-border-radius)}.kbq-popover{box-shadow:var(--kbq-popover-borderless-shadow)}.kbq-popover.kbq-popover_arrowless{box-shadow:var(--kbq-popover-container-shadow)}.kbq-popover__container{background:var(--kbq-popover-container-background)}.kbq-popover__arrow{box-shadow:var(--kbq-popover-borderless-shadow);background:var(--kbq-popover-container-background)}.kbq-popover__close{background-color:var(--kbq-background-overlay-inverse)}.kbq-popover__header{color:var(--kbq-popover-header-text-color)}.kbq-popover__content{color:var(--kbq-popover-content-text-color)}.kbq-popover__header{font-size:var(--kbq-typography-subheading-font-size);font-style:var(--kbq-typography-subheading-font-style);font-weight:var(--kbq-typography-subheading-font-weight);line-height:var(--kbq-typography-subheading-line-height);font-family:var(--kbq-typography-subheading-font-family);text-transform:var(--kbq-typography-subheading-text-transform);font-feature-settings:var(--kbq-typography-subheading-font-feature-settings);letter-spacing:var(--kbq-typography-subheading-letter-spacing)}.kbq-popover__content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-popover{--kbq-popover-size-container-width-small: 200px;--kbq-popover-size-container-width-medium: 400px;--kbq-popover-size-container-width-large: 640px;--kbq-popover-size-container-border-radius: var(--kbq-size-m);--kbq-popover-size-container-max-height: 480px;--kbq-popover-size-close-button-width: 32px;--kbq-popover-size-close-button-margin-right: -16px;--kbq-popover-size-close-button-margin-top: -10px;--kbq-popover-size-header-padding-horizontal: var(--kbq-size-xxl);--kbq-popover-size-header-padding-top: var(--kbq-size-l);--kbq-popover-size-header-padding-bottom: var(--kbq-size-xs);--kbq-popover-size-content-padding-top: var(--kbq-size-xxl);--kbq-popover-size-content-padding-bottom: var(--kbq-size-3xl);--kbq-popover-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-popover-size-content-padding-with-header-top: var(--kbq-size-s);--kbq-popover-size-content-padding-with-footer-bottom: var(--kbq-size-s);--kbq-popover-size-footer-padding-vertical: var(--kbq-size-l);--kbq-popover-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-popover-container-background: var(--kbq-background-card);--kbq-popover-container-shadow: var(--kbq-shadow-popup);--kbq-popover-header-text-color: var(--kbq-foreground-contrast);--kbq-popover-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-popover-content-text-color: var(--kbq-foreground-contrast);--kbq-popover-footer-scroll-shadow: var(--kbq-shadow-overflow-normal-top);--kbq-popover-borderless-shadow: 0 2px 8px var(--kbq-shadow-key), 0 3px 8px var(--kbq-shadow-ambient)}\n"], dependencies: [{ kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [kbqPopoverAnimations.popoverState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqPopoverConfirmComponent, decorators: [{
            type: Component,
            args: [{ selector: 'kbq-popover-confirm-component', preserveWhitespaces: false, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [kbqPopoverAnimations.popoverState], template: "<div\n    cdkTrapFocus=\"true\"\n    cdkTrapFocusAutoCapture=\"true\"\n    class=\"kbq-popover-confirm kbq-popover\"\n    [ngClass]=\"classMap\"\n    [@state]=\"visibility\"\n    (@state.done)=\"animationDone($event)\"\n    (@state.start)=\"animationStart()\"\n>\n    <div class=\"kbq-popover__container\">\n        <div class=\"kbq-popover__content\">\n            <div>{{ confirmText }}</div>\n            <button kbq-button [color]=\"'contrast'\" (click)=\"onConfirm.next()\">\n                {{ confirmButtonText }}\n            </button>\n        </div>\n    </div>\n\n    <div class=\"kbq-popover__arrow\"></div>\n</div>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-size-border-width))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-size-border-radius)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-size-border-width))}.kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-popover{position:relative;border-radius:var(--kbq-popover-size-container-border-radius);box-sizing:border-box;list-style:none;white-space:pre-line;z-index:1}.kbq-popover.kbq-popover_small{max-width:var(--kbq-popover-size-container-width-small)}.kbq-popover.kbq-popover_small .kbq-popover__content{padding:var(--kbq-size-l)}.kbq-popover.kbq-popover_medium{max-width:var(--kbq-popover-size-container-width-medium)}.kbq-popover.kbq-popover_large{max-width:var(--kbq-popover-size-container-width-large)}.kbq-popover.kbq-popover_placement-top,.kbq-popover.kbq-popover_placement-top-left,.kbq-popover.kbq-popover_placement-top-right{margin-bottom:8px}.kbq-popover.kbq-popover_placement-right,.kbq-popover.kbq-popover_placement-right-top,.kbq-popover.kbq-popover_placement-right-bottom{margin-left:8px}.kbq-popover.kbq-popover_placement-bottom,.kbq-popover.kbq-popover_placement-bottom-left,.kbq-popover.kbq-popover_placement-bottom-right{margin-top:8px}.kbq-popover.kbq-popover_placement-left,.kbq-popover.kbq-popover_placement-left-top,.kbq-popover.kbq-popover_placement-left-bottom{margin-right:8px}.kbq-popover__content{overflow-y:auto}.kbq-popover__content.kbq-popover__content_default-paddings{padding:var(--kbq-popover-size-content-padding-top) var(--kbq-popover-size-content-padding-horizontal) var(--kbq-popover-size-content-padding-bottom)}.kbq-popover__container{overflow:hidden;display:flex;flex-direction:column;max-height:var(--kbq-popover-size-container-max-height);border-radius:var(--kbq-popover-size-container-border-radius)}.kbq-popover__container.kbq-popover__container_with-header .kbq-popover__content{padding-top:var(--kbq-size-s)}.kbq-popover__container.kbq-popover__container_with-footer .kbq-popover__content_default-paddings.kbq-popover__content{padding-bottom:var(--kbq-size-s)}.kbq-popover__content .kbq-popover__close-container{display:flex;justify-content:flex-end;height:0}.kbq-popover__content .kbq-popover__close-container .kbq-popover__close{top:auto;right:auto;transform:translateY(-50%) translate(50%)}.kbq-popover__header{display:flex;align-items:center;overflow:hidden}.kbq-popover__header .kbq-popover__header-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-popover__header.kbq-popover__header_default-paddings{padding:var(--kbq-popover-size-header-padding-top) var(--kbq-popover-size-header-padding-horizontal) var(--kbq-popover-size-header-padding-bottom) var(--kbq-popover-size-header-padding-horizontal)}.kbq-popover__header_top-overflow{position:relative;z-index:2;box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-popover__header_with-close-button{padding-right:var(--kbq-size-4xl)}.kbq-popover__footer.kbq-popover__footer_default-paddings{padding:var(--kbq-popover-size-footer-padding-vertical) var(--kbq-popover-size-footer-padding-horizontal)}.kbq-popover__footer_bottom-overflow{position:relative;z-index:2;box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-popover__arrow{position:absolute;z-index:-1;width:12px;height:12px;transform:rotate(45deg)}.kbq-popover_placement-top .kbq-popover__arrow{bottom:-5.5px;left:50%;margin-left:-5.5px}.kbq-popover_placement-top-left .kbq-popover__arrow{bottom:-5.5px;left:24px}.kbq-popover_placement-top-right .kbq-popover__arrow{bottom:-5.5px;right:24px}.kbq-popover_placement-right .kbq-popover__arrow{left:-5.5px;top:50%;margin-top:-5.5px}.kbq-popover_placement-right-top .kbq-popover__arrow{left:-5.5px;top:24px}.kbq-popover_placement-right-bottom .kbq-popover__arrow{left:-5.5px;bottom:24px}.kbq-popover_placement-left .kbq-popover__arrow{right:-5.5px;top:50%;margin-top:-5.5px}.kbq-popover_placement-left-top .kbq-popover__arrow{right:-5.5px;top:24px}.kbq-popover_placement-left-bottom .kbq-popover__arrow{right:-5.5px;bottom:24px}.kbq-popover_placement-bottom .kbq-popover__arrow{top:-5.5px;left:50%;margin-left:-5.5px}.kbq-popover_placement-bottom-left .kbq-popover__arrow{top:-5.5px;left:24px}.kbq-popover_placement-bottom-right .kbq-popover__arrow{top:-5.5px;right:24px}.kbq-popover__close{position:absolute;z-index:2;top:var(--kbq-size-s);right:var(--kbq-size-s);border-radius:var(--kbq-size-border-radius)}.kbq-popover{box-shadow:var(--kbq-popover-borderless-shadow)}.kbq-popover.kbq-popover_arrowless{box-shadow:var(--kbq-popover-container-shadow)}.kbq-popover__container{background:var(--kbq-popover-container-background)}.kbq-popover__arrow{box-shadow:var(--kbq-popover-borderless-shadow);background:var(--kbq-popover-container-background)}.kbq-popover__close{background-color:var(--kbq-background-overlay-inverse)}.kbq-popover__header{color:var(--kbq-popover-header-text-color)}.kbq-popover__content{color:var(--kbq-popover-content-text-color)}.kbq-popover__header{font-size:var(--kbq-typography-subheading-font-size);font-style:var(--kbq-typography-subheading-font-style);font-weight:var(--kbq-typography-subheading-font-weight);line-height:var(--kbq-typography-subheading-line-height);font-family:var(--kbq-typography-subheading-font-family);text-transform:var(--kbq-typography-subheading-text-transform);font-feature-settings:var(--kbq-typography-subheading-font-feature-settings);letter-spacing:var(--kbq-typography-subheading-letter-spacing)}.kbq-popover__content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-popover{--kbq-popover-size-container-width-small: 200px;--kbq-popover-size-container-width-medium: 400px;--kbq-popover-size-container-width-large: 640px;--kbq-popover-size-container-border-radius: var(--kbq-size-m);--kbq-popover-size-container-max-height: 480px;--kbq-popover-size-close-button-width: 32px;--kbq-popover-size-close-button-margin-right: -16px;--kbq-popover-size-close-button-margin-top: -10px;--kbq-popover-size-header-padding-horizontal: var(--kbq-size-xxl);--kbq-popover-size-header-padding-top: var(--kbq-size-l);--kbq-popover-size-header-padding-bottom: var(--kbq-size-xs);--kbq-popover-size-content-padding-top: var(--kbq-size-xxl);--kbq-popover-size-content-padding-bottom: var(--kbq-size-3xl);--kbq-popover-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-popover-size-content-padding-with-header-top: var(--kbq-size-s);--kbq-popover-size-content-padding-with-footer-bottom: var(--kbq-size-s);--kbq-popover-size-footer-padding-vertical: var(--kbq-size-l);--kbq-popover-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-popover-container-background: var(--kbq-background-card);--kbq-popover-container-shadow: var(--kbq-shadow-popup);--kbq-popover-header-text-color: var(--kbq-foreground-contrast);--kbq-popover-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);--kbq-popover-content-text-color: var(--kbq-foreground-contrast);--kbq-popover-footer-scroll-shadow: var(--kbq-shadow-overflow-normal-top);--kbq-popover-borderless-shadow: 0 2px 8px var(--kbq-shadow-key), 0 3px 8px var(--kbq-shadow-ambient)}\n"] }]
        }] });
export class KbqPopoverConfirmTrigger extends KbqPopoverTrigger {
    get confirmText() {
        return this._confirmText;
    }
    set confirmText(value) {
        this._confirmText = value;
        this.updateData();
    }
    get confirmButtonText() {
        return this._confirmButtonText;
    }
    set confirmButtonText(value) {
        this._confirmButtonText = value;
        this.updateData();
    }
    constructor(confirmText, confirmButtonText) {
        super();
        this.confirm = new EventEmitter();
        this._confirmButtonText = 'Да';
        this.confirmText = confirmText || 'Вы уверены, что хотите продолжить?';
        this.confirmButtonText = confirmButtonText || 'Да';
    }
    updateData() {
        if (!this.instance) {
            return;
        }
        super.updateData();
        this.setupButtonEvents();
        this.instance.confirmButtonText = this.confirmButtonText;
        this.instance.confirmText = this.confirmText;
    }
    setupButtonEvents() {
        this.instance.onConfirm.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
            this.confirm.emit();
            this.hide();
        });
    }
    getOverlayHandleComponentType() {
        return KbqPopoverConfirmComponent;
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqPopoverConfirmTrigger, deps: [{ token: KBQ_POPOVER_CONFIRM_TEXT, optional: true }, { token: KBQ_POPOVER_CONFIRM_BUTTON_TEXT, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
    /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqPopoverConfirmTrigger, selector: "[kbqPopoverConfirm]", inputs: { confirmText: ["kbqPopoverConfirmText", "confirmText"], confirmButtonText: ["kbqPopoverConfirmButtonText", "confirmButtonText"] }, outputs: { confirm: "confirm" }, host: { listeners: { "keydown": "keydownHandler($event)", "touchend": "touchendHandler()" }, properties: { "class.kbq-popover_open": "isOpen" } }, exportAs: ["kbqPopoverConfirm"], usesInheritance: true, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqPopoverConfirmTrigger, decorators: [{
            type: Directive,
            args: [{
                    selector: '[kbqPopoverConfirm]',
                    exportAs: 'kbqPopoverConfirm',
                    host: {
                        '[class.kbq-popover_open]': 'isOpen',
                        '(keydown)': 'keydownHandler($event)',
                        '(touchend)': 'touchendHandler()'
                    }
                }]
        }], ctorParameters: () => [{ type: undefined, decorators: [{
                    type: Optional
                }, {
                    type: Inject,
                    args: [KBQ_POPOVER_CONFIRM_TEXT]
                }] }, { type: undefined, decorators: [{
                    type: Optional
                }, {
                    type: Inject,
                    args: [KBQ_POPOVER_CONFIRM_BUTTON_TEXT]
                }] }], propDecorators: { confirm: [{
                type: Output
            }], confirmText: [{
                type: Input,
                args: ['kbqPopoverConfirmText']
            }], confirmButtonText: [{
                type: Input,
                args: ['kbqPopoverConfirmButtonText']
            }] } });
//# sourceMappingURL=data:application/json;base64, 