import { DragDropModule } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common';
import { Component, HostBinding, inject, signal } from '@angular/core';
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { ButtonGroupDirective } from '@metad/ocap-angular/core';
import { FormlyModule } from '@ngx-formly/core';
import { TranslateModule } from '@ngx-translate/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/material/button";
import * as i3 from "@ngx-formly/core";
import * as i4 from "@ngx-translate/core";
import * as i5 from "@angular/cdk/drag-drop";
/**
 * @deprecated CdkConfirmOptionsComponent
 */
export class NgmConfirmOptionsComponent {
    constructor() {
        this.data = inject(MAT_DIALOG_DATA);
        this.dialogRef = inject(MatDialogRef);
        this.isDialogContainer = true;
        this.formGroup = new FormGroup({});
        this.model = {};
        this.options = {};
        this.fields = signal(this.data.formFields);
    }
    onModelChange(event) {
        //
    }
    apply() {
        this.dialogRef.close(this.model);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgmConfirmOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NgmConfirmOptionsComponent, isStandalone: true, selector: "ngm-confirm-options", host: { properties: { "class.ngm-dialog-container": "this.isDialogContainer" } }, ngImport: i0, template: "<header mat-dialog-title cdkDrag cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle>\n    <h4 style=\"pointer-events: none;\">\n      <span class=\"font-bold\">{{data?.information}}</span>\n    </h4>\n</header>\n\n<mat-dialog-content class=\"mat-typography min-h-[100px]\">\n    <formly-form class=\"w-full\"\n        [form]=\"formGroup\"\n        [fields]=\"fields()\"\n        [model]=\"model\"\n        (modelChange)=\"onModelChange($event)\"\n        [options]=\"options\"\n    ></formly-form>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n    <div ngmButtonGroup>\n        <button mat-button mat-dialog-close>\n            {{ 'COMPONENTS.COMMON.CANCEL' | translate: {Default: 'Cancel'} }}\n        </button>\n        <button mat-raised-button color=\"accent\" cdkFocusInitial (click)=\"apply()\">\n            {{ 'COMPONENTS.COMMON.Confirm' | translate: {Default: 'Confirm'} }}\n        </button>\n    </div>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", exportAs: ["matButton"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5.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: i5.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: ButtonGroupDirective, selector: "[ngmButtonGroup]" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgmConfirmOptionsComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [
                        MatDialogModule,
                        MatButtonModule,
                        CommonModule, FormsModule, ReactiveFormsModule, FormlyModule, TranslateModule,
                        DragDropModule,
                        ButtonGroupDirective
                    ], selector: 'ngm-confirm-options', template: "<header mat-dialog-title cdkDrag cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle>\n    <h4 style=\"pointer-events: none;\">\n      <span class=\"font-bold\">{{data?.information}}</span>\n    </h4>\n</header>\n\n<mat-dialog-content class=\"mat-typography min-h-[100px]\">\n    <formly-form class=\"w-full\"\n        [form]=\"formGroup\"\n        [fields]=\"fields()\"\n        [model]=\"model\"\n        (modelChange)=\"onModelChange($event)\"\n        [options]=\"options\"\n    ></formly-form>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n    <div ngmButtonGroup>\n        <button mat-button mat-dialog-close>\n            {{ 'COMPONENTS.COMMON.CANCEL' | translate: {Default: 'Cancel'} }}\n        </button>\n        <button mat-raised-button color=\"accent\" cdkFocusInitial (click)=\"apply()\">\n            {{ 'COMPONENTS.COMMON.Confirm' | translate: {Default: 'Confirm'} }}\n        </button>\n    </div>\n</mat-dialog-actions>\n" }]
        }], propDecorators: { isDialogContainer: [{
                type: HostBinding,
                args: ['class.ngm-dialog-container']
            }] } });
//# sourceMappingURL=data:application/json;base64, 