/*
 *  @license
 *  Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
 *
 *  Use of this source code is governed by an Apache-2.0 license that can be
 *  found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
 */
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DejaPopupBase } from '../../model/popup-base.class';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "../popup-toolbar/popup-toolbar.component";
import * as i3 from "../popup-content/popup-content.component";
import * as i4 from "@angular/common";
import * as i5 from "@angular/cdk/portal";
import * as i6 from "../../model/popup-config.model";
export class DejaPopupComponent extends DejaPopupBase {
    constructor(dialogRef, config, injector) {
        super();
        this.dialogRef = dialogRef;
        this.config = config;
        this.injector = injector;
        this.isMinified = false;
        this.isFullscreen = false;
    }
    // eslint-disable-next-line @typescript-eslint/no-empty-function
    doAction(_action) { }
}
DejaPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: DejaPopupComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
DejaPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: DejaPopupComponent, selector: "deja-popup", usesInheritance: true, ngImport: i0, template: "<deja-popup-toolbar *ngIf=\"config && config.title\" [config]=\"config\" (actionSelected)=\"dispatchAction($event)\">\n</deja-popup-toolbar>\n\n<div mat-dialog-content>\n    <deja-popup-content *ngIf=\"config?.hasContent()\" [config]=\"config\">\n    </deja-popup-content>\n</div>\n\n<div mat-dialog-actions *ngIf=\"config.hasActions()\">\n    <div [cdkPortalOutlet]=\"actionsPortal\"></div>\n</div>", styles: ["deja-popup .mat-dialog-content{padding:24px;margin:0}deja-popup .mat-dialog-actions:last-child{margin:0 24px!important}\n"], components: [{ type: i2.DejaPopupToolbarComponent, selector: "deja-popup-toolbar", inputs: ["config"], outputs: ["actionSelected"] }, { type: i3.DejaPopupContentComponent, selector: "deja-popup-content", inputs: ["config"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: DejaPopupComponent, decorators: [{
            type: Component,
            args: [{ encapsulation: ViewEncapsulation.None, selector: 'deja-popup', template: "<deja-popup-toolbar *ngIf=\"config && config.title\" [config]=\"config\" (actionSelected)=\"dispatchAction($event)\">\n</deja-popup-toolbar>\n\n<div mat-dialog-content>\n    <deja-popup-content *ngIf=\"config?.hasContent()\" [config]=\"config\">\n    </deja-popup-content>\n</div>\n\n<div mat-dialog-actions *ngIf=\"config.hasActions()\">\n    <div [cdkPortalOutlet]=\"actionsPortal\"></div>\n</div>", styles: ["deja-popup .mat-dialog-content{padding:24px;margin:0}deja-popup .mat-dialog-actions:last-child{margin:0 24px!important}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: i6.DejaPopupConfig, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }, { type: i0.Injector }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wdXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGVqYS1qcy9jb21wb25lbnQvcG9wdXAvY29tcG9uZ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