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 '';
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageValueViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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: "17.3.12", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtdmFsdWUtdmlldy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvdmFsdWUtdmlldy92YWx1ZS12aWV3cy9pbWFnZS12YWx1ZS12aWV3L2ltYWdlLXZhbHVlLXZpZXcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3ZhbHVlLXZpZXcvdmFsdWUtdmlld3MvaW1hZ2UtdmFsdWUtdmlldy9pbWFnZS12YWx1ZS12aWV3LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyx1QkFBdUIsRUFBRSxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFakUsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGtCQUFrQixDQUFDOzs7OztBQVEzQyxNQUFNLE9BQU8sdUJBQXdCLFNBQVEsU0FBUztJQUNwRCxJQUFJLEVBQUU7UUFDSixJQUFJLENBQUM7WUFDSCxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQztRQUNuQyxDQUFDO1FBQUMsTUFBTSxDQUFDO1lBQ1AsT0FBTyxFQUFFLENBQUM7UUFDWixDQUFDO0lBQ0gsQ0FBQzsrR0FQVSx1QkFBdUI7bUdBQXZCLHVCQUF1QixrRkNWcEMsaU9BS0E7OzRGREthLHVCQUF1QjtrQkFObkMsU0FBUzsrQkFDRSxxQkFBcUIsbUJBR2QsdUJBQXVCLENBQUMsTUF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