import { A11yModule } from '@angular/cdk/a11y';
import { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { Component, computed, HostBinding, inject } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { ButtonGroupDirective } from '@metad/ocap-angular/core';
import { TranslateModule } from '@ngx-translate/core';
import * as i0 from "@angular/core";
import * as i1 from "@ngx-translate/core";
import * as i2 from "@angular/cdk/drag-drop";
import * as i3 from "@angular/material/button";
export class CdkConfirmDeleteComponent {
    constructor() {
        this.#data = inject(DIALOG_DATA);
        this.dialogRef = inject(DialogRef);
        this.isDialogContainer = true;
        this.title = computed(() => this.#data?.title);
        this.value = computed(() => this.#data?.value);
        this.information = computed(() => this.#data?.information);
    }
    #data;
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CdkConfirmDeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CdkConfirmDeleteComponent, isStandalone: true, selector: "cdk-confirm-delete", host: { properties: { "class.ngm-dialog-container": "this.isDialogContainer" }, classAttribute: "cdk-dialog-card" }, ngImport: i0, template: "<header cdkDrag cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle class=\"pb-2 cursor-move\">\n  <h4 class=\"text-xl pointer-events-none\">\n    @if (title()) {\n      {{ title() }}\n    } @else {\n      {{ 'COMPONENTS.CONFIRM.DELETE' | translate: {Default: 'Confirm Delete'} }}\n      @if (value()) {\n          [<span class=\"font-bold\">{{value()}}</span>]\n      }\n      ?\n    }\n  </h4>\n</header>\n\n<div class=\"mat-typography min-h-[100px] py-4\">\n  <div class=\"whitespace-pre-line\">{{information()}}</div>\n</div>\n\n<div class=\"w-full flex justify-end\">\n  <div ngmButtonGroup>\n    <button mat-button (click)=\"dialogRef.close()\">\n      {{ 'COMPONENTS.COMMON.CANCEL' | translate: {Default: 'Cancel'} }}\n    </button>\n    <button mat-raised-button color=\"warn\" cdkFocusInitial (click)=\"dialogRef.close(true)\">\n      {{ 'COMPONENTS.COMMON.Confirm' | translate: {Default: 'Confirm'} }}\n    </button>\n  </div>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: A11yModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", exportAs: ["matButton"] }, { kind: "directive", type: ButtonGroupDirective, selector: "[ngmButtonGroup]" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CdkConfirmDeleteComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, selector: 'cdk-confirm-delete', imports: [TranslateModule, A11yModule, DragDropModule, MatButtonModule, ButtonGroupDirective], host: {
                        'class': 'cdk-dialog-card'
                    }, template: "<header cdkDrag cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle class=\"pb-2 cursor-move\">\n  <h4 class=\"text-xl pointer-events-none\">\n    @if (title()) {\n      {{ title() }}\n    } @else {\n      {{ 'COMPONENTS.CONFIRM.DELETE' | translate: {Default: 'Confirm Delete'} }}\n      @if (value()) {\n          [<span class=\"font-bold\">{{value()}}</span>]\n      }\n      ?\n    }\n  </h4>\n</header>\n\n<div class=\"mat-typography min-h-[100px] py-4\">\n  <div class=\"whitespace-pre-line\">{{information()}}</div>\n</div>\n\n<div class=\"w-full flex justify-end\">\n  <div ngmButtonGroup>\n    <button mat-button (click)=\"dialogRef.close()\">\n      {{ 'COMPONENTS.COMMON.CANCEL' | translate: {Default: 'Cancel'} }}\n    </button>\n    <button mat-raised-button color=\"warn\" cdkFocusInitial (click)=\"dialogRef.close(true)\">\n      {{ 'COMPONENTS.COMMON.Confirm' | translate: {Default: 'Confirm'} }}\n    </button>\n  </div>\n</div>\n", styles: [":host{display:block}\n"] }]
        }], propDecorators: { isDialogContainer: [{
                type: HostBinding,
                args: ['class.ngm-dialog-container']
            }] } });
//# sourceMappingURL=data:application/json;base64, 