import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { SmzCardsView } from '../../../models/smz-cards-types';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng/button";
import * as i3 from "../../../../../common/directives/server-image/server-image.directive";
import * as i4 from "../../../../smz-menu/smz-menu.component";
import * as i5 from "primeng/tooltip";
import * as i6 from "../../../directives/content-selector.directive";
import * as i7 from "../../../directives/button-actions.directive";
import * as i8 from "../../../directives/inject-component.directive";
import * as i9 from "../../../pipes/card-content.pipe";
import * as i10 from "../../../pipes/transform-content.pipe";
export class SmzImageWithDetailsTypeComponent {
    constructor() {
        this.isDebug = false;
        this.modes = SmzCardsView;
    }
    ngOnInit() {
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SmzImageWithDetailsTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: SmzImageWithDetailsTypeComponent, selector: "smz-image-with-details-type", inputs: { template: "template", data: "data", mode: "mode", isDebug: "isDebug", buttons: "buttons", menu: "menu" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"mode\">\r\n\r\n<ng-container *ngSwitchCase=\"modes.GRID\">\r\n\r\n  <div class=\"h-full grid grid-nogutter flex-col items-start justify-start gap-2 relative\" [ngClass]=\"template.cardStyleClass + (isDebug ? ' border border-red-500 border-solid' : '')\">\r\n\r\n    <!-- IMAGE -->\r\n    <ng-container *ngIf=\"template.image | transformContent : data as image\">\r\n      <img\r\n        serverImage\r\n        [path]=\"image.transform.override ? image.transform.override.dataPath : (data | cardsContent : image.dataPath).result\"\r\n        [maximize]=\"image.maximize\"\r\n        [openMaximized]=\"image.openMaximized\"\r\n        [placeholder]=\"'assets/images/placeholder.jpeg'\"\r\n        [title]=\"image.title.isVisible ? image.title.getText(data) : null\"\r\n        [useServerPath]=\"image.useServerPath\"\r\n        [ngClass]=\"image.gridStyleClass\"\r\n      >\r\n    </ng-container>\r\n\r\n    <div class=\"grid grid-nogutter flex-col items-start justify-start gap-2 col\" [ngClass]=\"template.contentStyleClass\">\r\n\r\n      <!-- TITLE -->\r\n      <div *ngIf=\"template.title && !template.title.hideInGrid\" contentSelector [content]=\"template.title\" [data]=\"data\" [ngClass]=\"template.title.conditionalStyleClass != null ? template.title.conditionalStyleClass(data) : (template.title.styleClass ?? 'font-bold')\"></div>\r\n\r\n      <!-- SUBTITLE -->\r\n      <div *ngIf=\"template.subTitle && !template.subTitle.hideInGrid\" contentSelector [content]=\"template.subTitle\" [data]=\"data\" [ngClass]=\"template.title.conditionalStyleClass != null ? template.title.conditionalStyleClass(data) : (template.subTitle.styleClass ?? 'text-sm')\"></div>\r\n\r\n      <!-- TAGS -->\r\n      <div class=\"col-12 grid grid-nogutter items-center justify-start gap-2\">\r\n        <ng-container *ngFor=\"let tag of template.tags let i = index\">\r\n          <div *ngIf=\"!tag.hideInGrid\" contentSelector [content]=\"tag\" [data]=\"data\" [ngClass]=\"tag.conditionalStyleClass != null ? tag.conditionalStyleClass(data) : (tag.styleClass ?? 'px-2 py-1 text-sm bg-gray-200 text-surface-50 rounded')\"></div>\r\n        </ng-container>\r\n      </div>\r\n\r\n      <!-- COMPONENTS -->\r\n      <ng-container *ngFor=\"let component of template.components let i = index\">\r\n        <ng-template [smzInjectDataPathComponent]=\"component.componentData\" [data]=\"data\" [state]=\"template._context\"></ng-template>\r\n      </ng-container>\r\n\r\n      <!-- OTHERS -->\r\n      <ng-container *ngFor=\"let other of template.others let i = index\">\r\n        <div *ngIf=\"!other.hideInGrid\" contentSelector [content]=\"other\" [data]=\"data\" [ngClass]=\"other.conditionalStyleClass != null ? other.conditionalStyleClass(data) : (other.styleClass ?? 'text-sm')\"></div>\r\n      </ng-container>\r\n\r\n      <div class=\"col\"></div>\r\n\r\n      <!-- BUTTONS -->\r\n      <ng-container *ngIf=\"buttons.callback != null && buttons.callback(data) as buttons\">\r\n        <div class=\"grid grid-nogutter items-center justify-start gap-1\">\r\n          <ng-container *ngFor=\"let button of buttons; let i = index\">\r\n            <button *ngIf=\"button.visible\" pButton type=\"button\" buttonAction [item]=\"button\" [data]=\"data\" [label]=\"button.label\" [icon]=\"button.icon\" [disabled]=\"button.disabled\" [pTooltip]=\"button.tooltip\" class=\"p-button-outlined p-button-sm px-3 py-2\" [ngClass]=\"button.styleClass\"></button>\r\n          </ng-container>\r\n        </div>\r\n      </ng-container>\r\n\r\n    </div>\r\n\r\n    <!-- MENU -->\r\n    <ng-container *ngIf=\"menu.callback != null && menu.callback(data) as menuItem\">\r\n      <div class=\"grid grid-nogutter items-center justify-end gap-1 col-12 absolute top-2 right-2\">\r\n        <smz-menu [items]=\"menuItem\" [data]=\"data\" [icon]=\"menu.icon\" [styleClass]=\"menu.styleClass\" [buttonClass]=\"menu.buttonClass\"></smz-menu>\r\n      </div>\r\n    </ng-container>\r\n\r\n  </div>\r\n\r\n</ng-container>\r\n\r\n<ng-container *ngSwitchCase=\"modes.LIST\">\r\n\r\n  <div class=\"grid grid-nogutter items-start justify-start gap-4 relative col\" [ngClass]=\"template.cardStyleClass + (isDebug ? ' border border-red-500 border-solid' : '')\">\r\n\r\n    <!-- IMAGE -->\r\n    <ng-container *ngIf=\"template.image | transformContent : data as image\">\r\n      <img\r\n        serverImage\r\n        [path]=\"image.transform.override ? image.transform.override.dataPath : (data | cardsContent : image.dataPath).result\"\r\n        [maximize]=\"image.maximize\"\r\n        [openMaximized]=\"image.openMaximized\"\r\n        [placeholder]=\"'assets/images/placeholder.jpeg'\"\r\n        [title]=\"image.title.isVisible ? image.title.getText(data) : null\"\r\n        [useServerPath]=\"image.useServerPath\"\r\n        [ngClass]=\"image.listStyleClass\"\r\n      >\r\n    </ng-container>\r\n\r\n    <div class=\"h-full grid grid-nogutter flex-col items-start justify-start gap-2 relative col\" [ngClass]=\"template.contentStyleClass\">\r\n\r\n        <!-- TITLE -->\r\n        <div *ngIf=\"template.title && !template.title.hideInList\" contentSelector [content]=\"template.title\" [data]=\"data\" [ngClass]=\"template.title.styleClass ?? 'font-bold'\"></div>\r\n\r\n        <!-- SUBTITLE -->\r\n        <div *ngIf=\"template.subTitle && !template.subTitle.hideInList\" contentSelector [content]=\"template.subTitle\" [data]=\"data\" [ngClass]=\"template.subTitle.styleClass ?? 'text-sm'\"></div>\r\n\r\n        <!-- TAGS -->\r\n        <div class=\"col-12 grid grid-nogutter items-center justify-start gap-2\">\r\n          <ng-container *ngFor=\"let tag of template.tags let i = index\">\r\n            <div *ngIf=\"!tag.hideInList\" contentSelector [content]=\"tag\" [data]=\"data\" [ngClass]=\"tag.styleClass ?? 'px-2 py-1 text-sm bg-gray-200 text-surface-50 rounded'\"></div>\r\n          </ng-container>\r\n        </div>\r\n\r\n        <!-- COMPONENTS -->\r\n        <ng-container *ngFor=\"let component of template.components let i = index\">\r\n          <ng-template [smzInjectDataPathComponent]=\"component.componentData\" [data]=\"data\" [state]=\"template._context\"></ng-template>\r\n        </ng-container>\r\n\r\n        <!-- OTHERS -->\r\n        <ng-container *ngFor=\"let other of template.others let i = index\">\r\n          <div *ngIf=\"!other.hideInList\" contentSelector [content]=\"other\" [data]=\"data\" [ngClass]=\"other.styleClass ?? 'text-sm'\"></div>\r\n        </ng-container>\r\n\r\n        <div class=\"col\"></div>\r\n\r\n        <!-- BUTTONS -->\r\n        <ng-container *ngIf=\"buttons.callback != null && buttons.callback(data) as buttons\">\r\n          <div class=\"grid grid-nogutter items-center justify-start gap-1\">\r\n            <ng-container *ngFor=\"let button of buttons; let i = index\">\r\n              <button *ngIf=\"button.visible\" pButton type=\"button\" buttonAction [item]=\"button\" [data]=\"data\" [label]=\"button.label\" [icon]=\"button.icon\" [disabled]=\"button.disabled\" [pTooltip]=\"button.tooltip\" class=\"p-button-outlined p-button-sm px-3 py-2\" [ngClass]=\"button.styleClass\"></button>\r\n            </ng-container>\r\n          </div>\r\n        </ng-container>\r\n\r\n      </div>\r\n\r\n      <!-- MENU -->\r\n      <ng-container *ngIf=\"menu.callback != null && menu.callback(data) as menuItem\">\r\n        <div class=\"grid grid-nogutter items-center justify-end gap-1 col-12 absolute top-2 right-2\">\r\n          <smz-menu [items]=\"menuItem\" [data]=\"data\" [icon]=\"menu.icon\" [styleClass]=\"menu.styleClass\" [buttonClass]=\"menu.buttonClass\"></smz-menu>\r\n        </div>\r\n      </ng-container>\r\n\r\n  </div>\r\n\r\n</ng-container>\r\n\r\n</ng-container>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i3.ServerImageDirective, selector: "img[serverImage]", inputs: ["src", "path", "placeholder", "errorPlaceholder", "maximize", "openMaximized", "title", "useServerPath"] }, { kind: "component", type: i4.SmzMenuComponent, selector: "smz-menu", inputs: ["items", "callback", "data", "buttonClass", "styleClass", "icon", "behavior"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i6.SmzCardsContentSelectorDirective, selector: "div[contentSelector]", inputs: ["content", "data", "callback"] }, { kind: "directive", type: i7.ButtonActionsDirective, selector: "[buttonAction]", inputs: ["item", "data"] }, { kind: "directive", type: i8.SmzInjectDataPathComponent, selector: "[smzInjectDataPathComponent]", inputs: ["smzInjectDataPathComponent", "data", "state"] }, { kind: "pipe", type: i9.SmzCardsContentPipe, name: "cardsContent" }, { kind: "pipe", type: i10.SmzCardsTransformContentPipe, name: "transformContent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SmzImageWithDetailsTypeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-image-with-details-type', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"mode\">\r\n\r\n<ng-container *ngSwitchCase=\"modes.GRID\">\r\n\r\n  <div class=\"h-full grid grid-nogutter flex-col items-start justify-start gap-2 relative\" [ngClass]=\"template.cardStyleClass + (isDebug ? ' border border-red-500 border-solid' : '')\">\r\n\r\n    <!-- IMAGE -->\r\n    <ng-container *ngIf=\"template.image | transformContent : data as image\">\r\n      <img\r\n        serverImage\r\n        [path]=\"image.transform.override ? image.transform.override.dataPath : (data | cardsContent : image.dataPath).result\"\r\n        [maximize]=\"image.maximize\"\r\n        [openMaximized]=\"image.openMaximized\"\r\n        [placeholder]=\"'assets/images/placeholder.jpeg'\"\r\n        [title]=\"image.title.isVisible ? image.title.getText(data) : null\"\r\n        [useServerPath]=\"image.useServerPath\"\r\n        [ngClass]=\"image.gridStyleClass\"\r\n      >\r\n    </ng-container>\r\n\r\n    <div class=\"grid grid-nogutter flex-col items-start justify-start gap-2 col\" [ngClass]=\"template.contentStyleClass\">\r\n\r\n      <!-- TITLE -->\r\n      <div *ngIf=\"template.title && !template.title.hideInGrid\" contentSelector [content]=\"template.title\" [data]=\"data\" [ngClass]=\"template.title.conditionalStyleClass != null ? template.title.conditionalStyleClass(data) : (template.title.styleClass ?? 'font-bold')\"></div>\r\n\r\n      <!-- SUBTITLE -->\r\n      <div *ngIf=\"template.subTitle && !template.subTitle.hideInGrid\" contentSelector [content]=\"template.subTitle\" [data]=\"data\" [ngClass]=\"template.title.conditionalStyleClass != null ? template.title.conditionalStyleClass(data) : (template.subTitle.styleClass ?? 'text-sm')\"></div>\r\n\r\n      <!-- TAGS -->\r\n      <div class=\"col-12 grid grid-nogutter items-center justify-start gap-2\">\r\n        <ng-container *ngFor=\"let tag of template.tags let i = index\">\r\n          <div *ngIf=\"!tag.hideInGrid\" contentSelector [content]=\"tag\" [data]=\"data\" [ngClass]=\"tag.conditionalStyleClass != null ? tag.conditionalStyleClass(data) : (tag.styleClass ?? 'px-2 py-1 text-sm bg-gray-200 text-surface-50 rounded')\"></div>\r\n        </ng-container>\r\n      </div>\r\n\r\n      <!-- COMPONENTS -->\r\n      <ng-container *ngFor=\"let component of template.components let i = index\">\r\n        <ng-template [smzInjectDataPathComponent]=\"component.componentData\" [data]=\"data\" [state]=\"template._context\"></ng-template>\r\n      </ng-container>\r\n\r\n      <!-- OTHERS -->\r\n      <ng-container *ngFor=\"let other of template.others let i = index\">\r\n        <div *ngIf=\"!other.hideInGrid\" contentSelector [content]=\"other\" [data]=\"data\" [ngClass]=\"other.conditionalStyleClass != null ? other.conditionalStyleClass(data) : (other.styleClass ?? 'text-sm')\"></div>\r\n      </ng-container>\r\n\r\n      <div class=\"col\"></div>\r\n\r\n      <!-- BUTTONS -->\r\n      <ng-container *ngIf=\"buttons.callback != null && buttons.callback(data) as buttons\">\r\n        <div class=\"grid grid-nogutter items-center justify-start gap-1\">\r\n          <ng-container *ngFor=\"let button of buttons; let i = index\">\r\n            <button *ngIf=\"button.visible\" pButton type=\"button\" buttonAction [item]=\"button\" [data]=\"data\" [label]=\"button.label\" [icon]=\"button.icon\" [disabled]=\"button.disabled\" [pTooltip]=\"button.tooltip\" class=\"p-button-outlined p-button-sm px-3 py-2\" [ngClass]=\"button.styleClass\"></button>\r\n          </ng-container>\r\n        </div>\r\n      </ng-container>\r\n\r\n    </div>\r\n\r\n    <!-- MENU -->\r\n    <ng-container *ngIf=\"menu.callback != null && menu.callback(data) as menuItem\">\r\n      <div class=\"grid grid-nogutter items-center justify-end gap-1 col-12 absolute top-2 right-2\">\r\n        <smz-menu [items]=\"menuItem\" [data]=\"data\" [icon]=\"menu.icon\" [styleClass]=\"menu.styleClass\" [buttonClass]=\"menu.buttonClass\"></smz-menu>\r\n      </div>\r\n    </ng-container>\r\n\r\n  </div>\r\n\r\n</ng-container>\r\n\r\n<ng-container *ngSwitchCase=\"modes.LIST\">\r\n\r\n  <div class=\"grid grid-nogutter items-start justify-start gap-4 relative col\" [ngClass]=\"template.cardStyleClass + (isDebug ? ' border border-red-500 border-solid' : '')\">\r\n\r\n    <!-- IMAGE -->\r\n    <ng-container *ngIf=\"template.image | transformContent : data as image\">\r\n      <img\r\n        serverImage\r\n        [path]=\"image.transform.override ? image.transform.override.dataPath : (data | cardsContent : image.dataPath).result\"\r\n        [maximize]=\"image.maximize\"\r\n        [openMaximized]=\"image.openMaximized\"\r\n        [placeholder]=\"'assets/images/placeholder.jpeg'\"\r\n        [title]=\"image.title.isVisible ? image.title.getText(data) : null\"\r\n        [useServerPath]=\"image.useServerPath\"\r\n        [ngClass]=\"image.listStyleClass\"\r\n      >\r\n    </ng-container>\r\n\r\n    <div class=\"h-full grid grid-nogutter flex-col items-start justify-start gap-2 relative col\" [ngClass]=\"template.contentStyleClass\">\r\n\r\n        <!-- TITLE -->\r\n        <div *ngIf=\"template.title && !template.title.hideInList\" contentSelector [content]=\"template.title\" [data]=\"data\" [ngClass]=\"template.title.styleClass ?? 'font-bold'\"></div>\r\n\r\n        <!-- SUBTITLE -->\r\n        <div *ngIf=\"template.subTitle && !template.subTitle.hideInList\" contentSelector [content]=\"template.subTitle\" [data]=\"data\" [ngClass]=\"template.subTitle.styleClass ?? 'text-sm'\"></div>\r\n\r\n        <!-- TAGS -->\r\n        <div class=\"col-12 grid grid-nogutter items-center justify-start gap-2\">\r\n          <ng-container *ngFor=\"let tag of template.tags let i = index\">\r\n            <div *ngIf=\"!tag.hideInList\" contentSelector [content]=\"tag\" [data]=\"data\" [ngClass]=\"tag.styleClass ?? 'px-2 py-1 text-sm bg-gray-200 text-surface-50 rounded'\"></div>\r\n          </ng-container>\r\n        </div>\r\n\r\n        <!-- COMPONENTS -->\r\n        <ng-container *ngFor=\"let component of template.components let i = index\">\r\n          <ng-template [smzInjectDataPathComponent]=\"component.componentData\" [data]=\"data\" [state]=\"template._context\"></ng-template>\r\n        </ng-container>\r\n\r\n        <!-- OTHERS -->\r\n        <ng-container *ngFor=\"let other of template.others let i = index\">\r\n          <div *ngIf=\"!other.hideInList\" contentSelector [content]=\"other\" [data]=\"data\" [ngClass]=\"other.styleClass ?? 'text-sm'\"></div>\r\n        </ng-container>\r\n\r\n        <div class=\"col\"></div>\r\n\r\n        <!-- BUTTONS -->\r\n        <ng-container *ngIf=\"buttons.callback != null && buttons.callback(data) as buttons\">\r\n          <div class=\"grid grid-nogutter items-center justify-start gap-1\">\r\n            <ng-container *ngFor=\"let button of buttons; let i = index\">\r\n              <button *ngIf=\"button.visible\" pButton type=\"button\" buttonAction [item]=\"button\" [data]=\"data\" [label]=\"button.label\" [icon]=\"button.icon\" [disabled]=\"button.disabled\" [pTooltip]=\"button.tooltip\" class=\"p-button-outlined p-button-sm px-3 py-2\" [ngClass]=\"button.styleClass\"></button>\r\n            </ng-container>\r\n          </div>\r\n        </ng-container>\r\n\r\n      </div>\r\n\r\n      <!-- MENU -->\r\n      <ng-container *ngIf=\"menu.callback != null && menu.callback(data) as menuItem\">\r\n        <div class=\"grid grid-nogutter items-center justify-end gap-1 col-12 absolute top-2 right-2\">\r\n          <smz-menu [items]=\"menuItem\" [data]=\"data\" [icon]=\"menu.icon\" [styleClass]=\"menu.styleClass\" [buttonClass]=\"menu.buttonClass\"></smz-menu>\r\n        </div>\r\n      </ng-container>\r\n\r\n  </div>\r\n\r\n</ng-container>\r\n\r\n</ng-container>" }]
        }], ctorParameters: () => [], propDecorators: { template: [{
                type: Input
            }], data: [{
                type: Input
            }], mode: [{
                type: Input
            }], isDebug: [{
                type: Input
            }], buttons: [{
                type: Input
            }], menu: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 