import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ValueView } from '../../value-view';
import * as i0 from "@angular/core";
import * as i1 from "@aztrix/components/image-source";
import * as i2 from "@aztrix/icons";
import * as i3 from "../../value-view-label.component";
export class ImageValueViewComponent extends ValueView {
    get id() {
        try {
            return JSON.parse(this.value).id;
        }
        catch {
            return '';
        }
    }
}
ImageValueViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ImageValueViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
ImageValueViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: ImageValueViewComponent, selector: "ax-image-value-view", usesInheritance: true, ngImport: i0, template: "<ax-value-view-label [label]=\"label\">\n  <ax-image-source class=\"image\" [source]=\"'/staticFiles/pageFiles/' + id\">\n    <ax-icon class=\"icon\" name=\"image\"></ax-icon>\n  </ax-image-source>\n</ax-value-view-label>\n", styles: [".image{max-width:100px}\n", ":host{display:grid;grid-template-rows:auto auto;align-items:center;font-weight:400;max-width:100%;width:100%;margin-bottom:.25rem}\n"], dependencies: [{ kind: "component", type: i1.ImageSourceComponent, selector: "ax-image-source", inputs: ["source", "fallbackSource", "actualSize", "alt", "round", "rounded", "border"] }, { kind: "component", type: i2.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "component", type: i3.ValueViewLabelComponent, selector: "ax-value-view-label", inputs: ["label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ImageValueViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-image-value-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-value-view-label [label]=\"label\">\n  <ax-image-source class=\"image\" [source]=\"'/staticFiles/pageFiles/' + id\">\n    <ax-icon class=\"icon\" name=\"image\"></ax-icon>\n  </ax-image-source>\n</ax-value-view-label>\n", styles: [".image{max-width:100px}\n", ":host{display:grid;grid-template-rows:auto auto;align-items:center;font-weight:400;max-width:100%;width:100%;margin-bottom:.25rem}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtdmFsdWUtdmlldy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvdmFsdWUtdmlldy92YWx1ZS12aWV3cy9pbWFnZS12YWx1ZS12aWV3L2ltYWdlLXZhbHVlLXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3ZhbHVlLXZpZXcvdmFsdWUtdmlld3MvaW1hZ2UtdmFsdWUtdmlldy9pbWFnZS12YWx1ZS12aWV3LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyx1QkFBdUIsRUFBRSxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFakUsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGtCQUFrQixDQUFDOzs7OztBQVEzQyxNQUFNLE9BQU8sdUJBQXdCLFNBQVEsU0FBUztJQUNwRCxJQUFJLEVBQUU7UUFDSixJQUFJO1lBQ0YsT0FBTyxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxFQUFFLENBQUM7U0FDbEM7UUFBQyxNQUFNO1lBQ04sT0FBTyxFQUFFLENBQUM7U0FDWDtJQUNILENBQUM7O29IQVBVLHVCQUF1Qjt3R0FBdkIsdUJBQXVCLGtGQ1ZwQyxpT0FLQTsyRkRLYSx1QkFBdUI7a0JBTm5DLFNBQVM7K0JBQ0UscUJBQXFCLG1CQUdkLHVCQUF1QixDQUFDLE1BQU0iLCJzb3VyY2Vz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