import { Component, HostBinding, ChangeDetectionStrategy, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/router";
import * as i3 from "@angular/material/card";
function EuiCardMediaComponent_ng_container_1_ng_content_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵprojection(0, 0, ["*ngTemplateOutlet", "mediacontent"]);
} }
function EuiCardMediaComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 3);
    i0.ɵɵtemplate(2, EuiCardMediaComponent_ng_container_1_ng_content_2_Template, 1, 0, "ng-content", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    const _r3 = i0.ɵɵreference(5);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("routerLink", ctx_r0.imageClickUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r3);
} }
function EuiCardMediaComponent_ng_container_2_ng_content_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵprojection(0, 1, ["*ngTemplateOutlet", "mediacontent"]);
} }
function EuiCardMediaComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 5);
    i0.ɵɵtemplate(2, EuiCardMediaComponent_ng_container_2_ng_content_2_Template, 1, 0, "ng-content", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    const _r3 = i0.ɵɵreference(5);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("href", ctx_r1.imageClickUrlExternal, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r3);
} }
function EuiCardMediaComponent_ng_container_3_ng_content_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵprojection(0, 2, ["*ngTemplateOutlet", "mediacontent"]);
} }
function EuiCardMediaComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, EuiCardMediaComponent_ng_container_3_ng_content_1_Template, 1, 0, "ng-content", 4);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r3 = i0.ɵɵreference(5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r3);
} }
function EuiCardMediaComponent_ng_template_4_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r8.imageLegend);
} }
function EuiCardMediaComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 6);
    i0.ɵɵtemplate(1, EuiCardMediaComponent_ng_template_4_div_1_Template, 2, 1, "div", 7);
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("alt", !ctx_r4.imageLegend ? ctx_r4.imageDescription : "");
    i0.ɵɵproperty("src", ctx_r4.imageUrl, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.imageLegend);
} }
const _c0 = ["*", "*", "*"];
export class EuiCardMediaComponent {
    constructor() {
        this.imageDescription = 'eUI Card Image';
        this.string = 'eui-card-media';
    }
}
/** @nocollapse */ EuiCardMediaComponent.ɵfac = function EuiCardMediaComponent_Factory(t) { return new (t || EuiCardMediaComponent)(); };
/** @nocollapse */ EuiCardMediaComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EuiCardMediaComponent, selectors: [["eui-card-media"]], hostVars: 2, hostBindings: function EuiCardMediaComponent_HostBindings(rf, ctx) { if (rf & 2) {
        i0.ɵɵclassMap(ctx.string);
    } }, inputs: { imageUrl: "imageUrl", imageLegend: "imageLegend", imageClickUrl: "imageClickUrl", imageClickUrlExternal: "imageClickUrlExternal", imageDescription: "imageDescription" }, ngContentSelectors: _c0, decls: 6, vars: 3, consts: [[1, "eui-card-media__container"], [4, "ngIf"], ["mediacontent", ""], [1, "eui-card-media__container-content", 3, "routerLink"], [4, "ngTemplateOutlet"], ["target", "_blank", 1, "eui-card-media__container-content", 3, "href"], ["mat-card-image", "", 3, "src", "alt"], ["class", "eui-card-media__legend", 4, "ngIf"], [1, "eui-card-media__legend"]], template: function EuiCardMediaComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵprojectionDef(_c0);
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtemplate(1, EuiCardMediaComponent_ng_container_1_Template, 3, 2, "ng-container", 1);
        i0.ɵɵtemplate(2, EuiCardMediaComponent_ng_container_2_Template, 3, 2, "ng-container", 1);
        i0.ɵɵtemplate(3, EuiCardMediaComponent_ng_container_3_Template, 2, 1, "ng-container", 1);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(4, EuiCardMediaComponent_ng_template_4_Template, 2, 3, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.imageClickUrl);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.imageClickUrlExternal);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.imageClickUrl && !ctx.imageClickUrlExternal);
    } }, directives: [i1.NgIf, i2.RouterLinkWithHref, i1.NgTemplateOutlet, i3.MatCardImage], encapsulation: 2, changeDetection: 0 });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiCardMediaComponent, [{
        type: Component,
        args: [{
                selector: 'eui-card-media',
                templateUrl: './eui-card-media.component.html',
                changeDetection: ChangeDetectionStrategy.OnPush,
            }]
    }], function () { return []; }, { imageUrl: [{
            type: Input
        }], imageLegend: [{
            type: Input
        }], imageClickUrl: [{
            type: Input
        }], imageClickUrlExternal: [{
            type: Input
        }], imageDescription: [{
            type: Input
        }], string: [{
            type: HostBinding,
            args: ['class']
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXVpLWNhcmQtbWVkaWEuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Ii9idWlsZHMvZXVpL2NjLWNzZHItcm9vdC9wYWNrYWdlcy9ldWkvcGFja2FnZXMvY29tcG9uZW50cy1uZXh0L3NyYy8iLCJzb3VyY2VzIjpbImxpYi9jb21wb25lbnRzL2V1aS1jYXJkL2NvbXBvbmVudHMvZXVpLWNhcmQtbWVkaWEvZXVpLWNhcmQtbWVkaWEuY29tcG9uZW50LnRzIiwibGliL2NvbXBvbmVudHMvZXVpLWNhcmQvY29tcG9uZW50cy9ldWktY2FyZC1tZWRpYS9ldWktY2FyZC1tZWRpYS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSx1QkFBdUIsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7OztJQ0czRSw0REFBNkM7OztJQUZyRCw2QkFDSTtJQUFBLDRCQUNJO0lBQUEsbUdBQTZDO0lBQ2pELGlCQUFJO0lBQ1IsMEJBQWU7Ozs7SUFIUixlQUE4QjtJQUE5Qiw0REFBOEI7SUFDakIsZUFBZ0M7SUFBaEMsc0NBQWdDOzs7SUFLNUMsNERBQTZDOzs7SUFGckQsNkJBQ0k7SUFBQSw0QkFDSTtJQUFBLG1HQUE2QztJQUNqRCxpQkFBSTtJQUNSLDBCQUFlOzs7O0lBSFIsZUFBZ0M7SUFBaEMsZ0ZBQWdDO0lBQ25CLGVBQWdDO0lBQWhDLHNDQUFnQ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