import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "./value-views/boolean-value-view/boolean-value-view.component";
import * as i3 from "./value-views/text-value-view/text-value-view.component";
import * as i4 from "./value-views/image-value-view/image-value-view.component";
import * as i5 from "./value-views/file-value-view/file-value-view.component";
import * as i6 from "./value-views/rich-text-value-view/rich-text-value-view.component";
import * as i7 from "./value-views/date-value-view/date-value-view.component";
import * as i8 from "@aztrix/helpers";
export class ValueViewComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ValueViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ValueViewComponent, selector: "ax-value-view", inputs: { type: "type", label: "label", value: "value" }, ngImport: i0, template: "<ng-template #valueView let-v>\n  <ng-container [ngSwitch]=\"type\">\n    <ax-boolean-value-view\n      *ngSwitchCase=\"'BOOLEAN'\"\n      [value]=\"v\"\n      [label]=\"label\"\n    ></ax-boolean-value-view>\n    <ax-image-value-view *ngSwitchCase=\"'IMAGE'\" [value]=\"v\" [label]=\"label\"></ax-image-value-view>\n    <ax-file-value-view *ngSwitchCase=\"'FILE'\" [value]=\"v\" [label]=\"label\"></ax-file-value-view>\n    <ax-rich-text-value-view\n      *ngSwitchCase=\"'RICH_TEXT'\"\n      [value]=\"v\"\n      [label]=\"label\"\n    ></ax-rich-text-value-view>\n    <ax-date-value-view *ngSwitchCase=\"'DATE'\" [value]=\"v\" [label]=\"label\"></ax-date-value-view>\n    <ax-text-value-view *ngSwitchDefault [value]=\"v\" [label]=\"label\"></ax-text-value-view>\n  </ng-container>\n</ng-template>\n\n@if (value | isArray) {\n  <ul class=\"values\">\n    @for (v of value; track v) {\n      <li>\n        <ng-container *ngTemplateOutlet=\"valueView; context: {$implicit: v}\"></ng-container>\n      </li>\n    }\n  </ul>\n} @else {\n  <ng-container *ngTemplateOutlet=\"valueView; context: {$implicit: value}\"></ng-container>\n}\n", styles: [":host{display:block;padding:.5rem 0}:host:first-child{padding-top:0}:host:last-child{padding-bottom:0}.values{margin:0}.values{list-style-type:none;padding-left:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.BooleanValueViewComponent, selector: "ax-boolean-value-view" }, { kind: "component", type: i3.TextValueViewComponent, selector: "ax-text-value-view" }, { kind: "component", type: i4.ImageValueViewComponent, selector: "ax-image-value-view" }, { kind: "component", type: i5.FileValueViewComponent, selector: "ax-file-value-view" }, { kind: "component", type: i6.RichTextValueViewComponent, selector: "ax-rich-text-value-view" }, { kind: "component", type: i7.DateValueViewComponent, selector: "ax-date-value-view" }, { kind: "pipe", type: i8.IsArrayPipe, name: "isArray" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ValueViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-value-view', template: "<ng-template #valueView let-v>\n  <ng-container [ngSwitch]=\"type\">\n    <ax-boolean-value-view\n      *ngSwitchCase=\"'BOOLEAN'\"\n      [value]=\"v\"\n      [label]=\"label\"\n    ></ax-boolean-value-view>\n    <ax-image-value-view *ngSwitchCase=\"'IMAGE'\" [value]=\"v\" [label]=\"label\"></ax-image-value-view>\n    <ax-file-value-view *ngSwitchCase=\"'FILE'\" [value]=\"v\" [label]=\"label\"></ax-file-value-view>\n    <ax-rich-text-value-view\n      *ngSwitchCase=\"'RICH_TEXT'\"\n      [value]=\"v\"\n      [label]=\"label\"\n    ></ax-rich-text-value-view>\n    <ax-date-value-view *ngSwitchCase=\"'DATE'\" [value]=\"v\" [label]=\"label\"></ax-date-value-view>\n    <ax-text-value-view *ngSwitchDefault [value]=\"v\" [label]=\"label\"></ax-text-value-view>\n  </ng-container>\n</ng-template>\n\n@if (value | isArray) {\n  <ul class=\"values\">\n    @for (v of value; track v) {\n      <li>\n        <ng-container *ngTemplateOutlet=\"valueView; context: {$implicit: v}\"></ng-container>\n      </li>\n    }\n  </ul>\n} @else {\n  <ng-container *ngTemplateOutlet=\"valueView; context: {$implicit: value}\"></ng-container>\n}\n", styles: [":host{display:block;padding:.5rem 0}:host:first-child{padding-top:0}:host:last-child{padding-bottom:0}.values{margin:0}.values{list-style-type:none;padding-left:0;margin:0}\n"] }]
        }], propDecorators: { type: [{
                type: Input
            }], label: [{
                type: Input
            }], value: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdWUtdmlldy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvdmFsdWUtdmlldy92YWx1ZS12aWV3LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy92YWx1ZS12aWV3L3ZhbHVlLXZpZXcuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7Ozs7QUFPL0MsTUFBTSxPQUFPLGtCQUFrQjsrR0FBbEIsa0JBQWtCO21HQUFsQixrQkFBa0IsK0dDUC9CLCttQ0E4QkE7OzRGRHZCYSxrQkFBa0I7a0JBTDlCLFNBQVM7K0JBQ0UsZUFBZTs4QkFLaEIsSUFBSTtzQkFBWixLQUFL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