import { __decorate, __param } from "tslib";
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
let DialogConfirmComponent = class DialogConfirmComponent {
    constructor(dialogRef, data) {
        this.dialogRef = dialogRef;
        this.data = data;
    }
    onNoClick() {
        this.dialogRef.close();
    }
};
DialogConfirmComponent.ctorParameters = () => [
    { type: MatDialogRef },
    { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
];
DialogConfirmComponent = __decorate([
    Component({
        selector: 'sd-dialog-confirm',
        template: "<h1 mat-dialog-title class=\"\">\r\n  <mat-icon *ngIf=\"data?.icon\" [ngClass]=\"data?.icon\">\r\n    {{data?.icon}}\r\n  </mat-icon>{{data?.title || 'Confirm'}}\r\n</h1>\r\n<div mat-dialog-content>\r\n  <div [innerHtml]=\"data?.message\">\r\n  </div>\r\n  <div *ngIf=\"data?.input\">\r\n    <mat-form-field class=\"sd-form\" appearance=\"outline\">\r\n      <textarea class=\"sd-input\" matInput placeholder=\"{{data.input?.placeholder}}\" [(ngModel)]=\"value\"\r\n        autocomplete=\"off\" rows=\"5\" [maxlength]=\"data.input?.maxlength\"></textarea>\r\n      <span *ngIf=\"data.input?.maxlength\" matSuffix>{{value?.length || 0}}/{{data.input?.maxlength}}</span>\r\n    </mat-form-field>\r\n  </div>\r\n</div>\r\n<div mat-dialog-actions align=\"end\">\r\n  <button *ngIf=\"data?.noTitle\" mat-button (click)=\"onNoClick()\">{{data?.noTitle}}</button>\r\n  <button *ngIf=\"data?.yesTitle\" mat-raised-button [mat-dialog-close]=\"value || 'ACCEPT'\" color=\"primary\"\r\n    [disabled]=\"data.input?.required && !value\" cdkFocusInitial>{{data?.yesTitle}}</button>\r\n</div>",
        encapsulation: ViewEncapsulation.None,
        styles: [".sd-form{width:100%;font-size:14px}.sd-form.sd-form-with-information{width:calc(100% - 30px)}.sd-information{display:inline-block;text-align:center;margin:auto;width:30px}.cdk-overlay-container .mat-option{font-size:12px}.swal2-popup .swal2-content .swal2-html-container{line-height:1.7;color:#7c7c7e}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month{opacity:1;cursor:pointer}.daterangepicker{z-index:99999}", "sd-dialog-confirm{padding:12px 16px;display:block}sd-dialog-confirm .mat-dialog-title{display:flex;align-items:center}sd-dialog-confirm .mat-dialog-title .mat-icon{margin-right:5px}sd-dialog-confirm .mat-dialog-content{margin:0 -16px 16px!important}sd-dialog-confirm .mat-button{background-color:#f5f5f5}"]
    }),
    __param(1, Inject(MAT_DIALOG_DATA))
], DialogConfirmComponent);
export { DialogConfirmComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWNvbmZpcm0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vc3VwZXJkZXYtYW5ndWxhci1jb3JlLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudHMvZGlhbG9nLWNvbmZpcm0vZGlhbG9nLWNvbmZpcm0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRSxPQUFPLEVBQUUsWUFBWSxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBeUJ6RSxJQUFhLHNCQUFzQixHQUFuQyxNQUFhLHNCQUFzQjtJQUVqQyxZQUNTLFNBQStDLEVBQ3RCLElBQWdCO1FBRHpDLGNBQVMsR0FBVCxTQUFTLENBQXNDO1FBQ3RCLFNBQUksR0FBSixJQUFJLENBQVk7SUFBSSxDQUFDO0lBRXZELFNBQVM7UUFDUCxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3pCLENBQUM7Q0FDRixDQUFBOztZQU5xQixZQUFZOzRDQUM3QixNQUFNLF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