import { ChangeDetectionStrategy, Component } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../modal-dialog/dialog-buttons.directive";
import * as i3 from "../modal-dialog/dialog-title.directive";
import * as i4 from "@ngx-translate/core";
/**
 * Used by ModalService.dialog() to host a generic configurable modal dialog.
 */
export class SimpleDialogComponent {
    constructor() {
        this.title = '';
        this.body = '';
        this.translationVars = {};
        this.buttons = [];
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: SimpleDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: SimpleDialogComponent, selector: "vdr-simple-dialog", ngImport: i0, template: "<ng-template vdrDialogTitle>{{ title | translate:translationVars }}</ng-template>\n<div style=\"white-space: pre-wrap;\">{{ body | translate:translationVars }}</div>\n<ng-template vdrDialogButtons>\n    <ng-container *ngFor=\"let button of buttons\">\n        <button\n            class=\"button ml-2\"\n            [class.primary]=\"button.type === 'primary'\"\n            [class.danger]=\"button.type === 'danger'\"\n            (click)=\"resolveWith(button.returnValue)\"\n        >\n            {{ button.label | translate: (button.translationVars || {}) }}\n        </button>\n    </ng-container>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.DialogButtonsDirective, selector: "[vdrDialogButtons]" }, { kind: "directive", type: i3.DialogTitleDirective, selector: "[vdrDialogTitle]" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: SimpleDialogComponent, decorators: [{
            type: Component,
            args: [{ selector: 'vdr-simple-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template vdrDialogTitle>{{ title | translate:translationVars }}</ng-template>\n<div style=\"white-space: pre-wrap;\">{{ body | translate:translationVars }}</div>\n<ng-template vdrDialogButtons>\n    <ng-container *ngFor=\"let button of buttons\">\n        <button\n            class=\"button ml-2\"\n            [class.primary]=\"button.type === 'primary'\"\n            [class.danger]=\"button.type === 'danger'\"\n            (click)=\"resolveWith(button.returnValue)\"\n        >\n            {{ button.label | translate: (button.translationVars || {}) }}\n        </button>\n    </ng-container>\n</ng-template>\n" }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2ltcGxlLWRpYWxvZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL3NpbXBsZS1kaWFsb2cvc2ltcGxlLWRpYWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvcmUvc3JjL3NoYXJlZC9jb21wb25lbnRzL3NpbXBsZS1kaWFsb2cvc2ltcGxlLWRpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDOzs7Ozs7QUFJM0U7O0dBRUc7QUFPSCxNQUFNLE9BQU8scUJBQXFCO0lBTmxDO1FBUUksVUFBSyxHQUFHLEVBQUUsQ0FBQztRQUNYLFNBQUksR0FBRyxFQUFFLENBQUM7UUFDVixvQkFBZSxHQUFHLEVBQUUsQ0FBQztRQUNyQixZQUFPLEdBQW1DLEVBQUUsQ0FBQztLQUNoRDs4R0FOWSxxQkFBcUI7a0dBQXJCLHFCQUFxQix5RENibEMsOG1CQWNBOzsyRkREYSxxQkFBcUI7a0JBTmpDLFNBQVM7K0JBQ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