import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
import { CornerDirective } from './../../directive/corner-directive';
import { ImageDirectiveDirective } from './../../directive/image-directive.directive';
import { TextBackgroundDirectiveDirective } from './../../directive/text-background-directive.directive';
import { SimpoButtonComponent } from '../simpo-button/simpo-button.component';
import { ObjectPositionDirective } from '../../directive/image-position.directive';
import { TextEditorComponent } from '../text-editor/text-editor.component';
import { ImageEditorDirective } from '../../directive/image-editor.directive';
import { HoverAnimationDirective } from '../../directive/hover-animation.directive';
import { ButtonDirectiveDirective } from '../../directive/button-directive.directive';
import * as i0 from "@angular/core";
import * as i1 from "../../services/events.service";
import * as i2 from "@angular/common";
export class CoveringImageCardComponent {
    constructor(_eventService) {
        this._eventService = _eventService;
    }
    ngOnInit() {
    }
    redirectTo() {
        this._eventService.buttonRedirection.emit({ data: this.data.button });
    }
    getContentAnimation() {
        return { contentAnimation: this.styles?.contentAnimation };
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CoveringImageCardComponent, deps: [{ token: i1.EventsService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CoveringImageCardComponent, isStandalone: true, selector: "simpo-covering-image-card", inputs: { data: "data", styles: "styles", content: "content", componentId: "componentId", button: "button", edit: "edit", itemIndex: "itemIndex" }, ngImport: i0, template: "<div class=\"parent-tab\" [id]=\"componentId\"\r\n  (click)=\"(content?.display?.showLink && content?.display?.linkType === 'List Item' ? redirectTo() : '')\">\r\n  <div class=\"popular-tag\" [simpoCorner]=\"styles?.corners\"\r\n    [ngStyle]=\"{'background-color': styles?.background?.accentColor}\" *ngIf=\"data?.highlight?.highlighted === true\">\r\n    <simpo-text-editor [(value)]=\"data.highlight.label\" [editable]=\"edit || false\" [sectionId]=\"componentId\" [itemIndex]=\"itemIndex\"></simpo-text-editor>\r\n  </div>\r\n  <ng-container *ngIf=\"content.display.showImage\">\r\n    <img loading=\"lazy\" [src]=\"data.image.url\" [alt]=\"data.image.altText\" [simpoCorner]=\"styles?.corners\"\r\n      [id]=\"componentId\" class=\"w-100 img\"\r\n      [attr.simpoObjectPosition]=\"styles?.image?.fit !== 'contain' ? data.image?.position : null\"\r\n      [class]=\"componentId+data.image.id\" [simpoImageDirective]=\"styles?.image\" loading=\"lazy\" [appImageEditor]=\"edit || false\"\r\n      [imageData]=\"data?.image\" [sectionId]=\"componentId\" [simpoObjectPosition]=\"data?.image?.position\" [itemIndex]=\"itemIndex\">\r\n    <!-- <img loading=\"lazy\" [simpoImageDirective]=\"styles?.image\" [simpoCorner]=\"styles?.corners\" [id]=\"data?.id\"\r\n      [class]=\"data?.id+data.image.id\" [simpoObjectPosition]=\"data.image.position\" [src]=\"data.image.url\"\r\n      [alt]=\"data.image.altText\" loading=\"lazy\" [appImageEditor]=\"edit || false\" [imageData]=\"data?.image\"\r\n      [sectionId]=\"data?.id\" class=\"w-100 h-100\" />\r\n  </ng-container> -->\r\n  </ng-container>\r\n  <div class=\"ptb-1 content\" [simpoCorner]=\"styles?.corners\" [id]=\"componentId\"\r\n    [simpoTextBackgroundDirective]=\"styles?.textBackground\">\r\n    <div class=\"heading-medium mb-1\" *ngIf=\"content.display.showHeading\">\r\n      <simpo-text-editor [(value)]=\"data.inputText[0].value \" [editable]=\"edit || false\" [sectionId]=\"componentId\" [inputTextIndex]=\"0\" [itemIndex]=\"itemIndex\" [isRTE]=\"data.inputText[0]?.isRTE\"></simpo-text-editor>\r\n    </div>\r\n    <div class=\"body-desc\" *ngIf=\"content.display.showContent\">\r\n      <simpo-text-editor [(value)]=\"data.inputText[1].value \" [editable]=\"edit || false\" [sectionId]=\"componentId\" [inputTextIndex]=\"1\" [itemIndex]=\"itemIndex\" [isRTE]=\"data.inputText[1]?.isRTE\"></simpo-text-editor>\r\n    </div>\r\n    <div *ngIf=\"content.display.showLink && content.display.linkType === 'Button'\"\r\n      [simpoHoverAnimation]=\"getContentAnimation()\">\r\n      <app-button-element [buttonContent]=\"data.button\" [buttonStyle]=\"button?.styles\" [sectionId]=\"componentId\"\r\n        [buttonId]=\"button ? button.id : ''\" [color]=\"styles?.background?.accentColor\" [edit]=\"edit\"\r\n        [backgroundInfo]=\"styles?.background\"></app-button-element>\r\n    </div>\r\n  </div>\r\n</div>", styles: [".w-100{width:100%}.mb-1{margin-bottom:1rem!important}.content{position:relative;bottom:0;padding:1.5rem;display:flex;flex-direction:column;min-height:100%}.content>div:last-child{margin-top:auto}.parent-tab{position:relative;height:100%;width:100%;display:flex;flex-direction:column}.img{position:absolute;height:100%;display:flex}.popular-tag{position:absolute;top:0;right:0;padding:1px 20px 3px;border-top-left-radius:0!important;border-bottom-right-radius:0!important;z-index:10}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: ImageDirectiveDirective, selector: "[simpoImageDirective]", inputs: ["simpoImageDirective"] }, { kind: "directive", type: CornerDirective, selector: "[simpoCorner]", inputs: ["simpoCorner"] }, { kind: "directive", type: TextBackgroundDirectiveDirective, selector: "[simpoTextBackgroundDirective]", inputs: ["simpoTextBackgroundDirective"] }, { kind: "component", type: TextEditorComponent, selector: "simpo-text-editor", inputs: ["value", "editable", "isRTE", "sectionId", "label", "type", "inputTextIndex", "itemIndex"], outputs: ["valueChange"] }, { kind: "component", type: SimpoButtonComponent, selector: "app-button-element", inputs: ["buttonContent", "buttonStyle", "buttonId", "color", "sectionId", "edit", "backgroundInfo", "disabled", "loading", "isFullWidth"] }, { kind: "directive", type: ObjectPositionDirective, selector: "[simpoObjectPosition]", inputs: ["simpoObjectPosition"] }, { kind: "directive", type: ImageEditorDirective, selector: "[appImageEditor]", inputs: ["appImageEditor", "imageData", "sectionId", "showIcon", "iconData", "itemIndex"] }, { kind: "directive", type: HoverAnimationDirective, selector: "[simpoHoverAnimation]", inputs: ["simpoHoverAnimation"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CoveringImageCardComponent, decorators: [{
            type: Component,
            args: [{ selector: 'simpo-covering-image-card', standalone: true, imports: [
                        CommonModule,
                        ImageDirectiveDirective,
                        CornerDirective,
                        TextBackgroundDirectiveDirective,
                        TextEditorComponent,
                        SimpoButtonComponent,
                        ObjectPositionDirective,
                        ImageEditorDirective,
                        HoverAnimationDirective,
                        ButtonDirectiveDirective
                    ], template: "<div class=\"parent-tab\" [id]=\"componentId\"\r\n  (click)=\"(content?.display?.showLink && content?.display?.linkType === 'List Item' ? redirectTo() : '')\">\r\n  <div class=\"popular-tag\" [simpoCorner]=\"styles?.corners\"\r\n    [ngStyle]=\"{'background-color': styles?.background?.accentColor}\" *ngIf=\"data?.highlight?.highlighted === true\">\r\n    <simpo-text-editor [(value)]=\"data.highlight.label\" [editable]=\"edit || false\" [sectionId]=\"componentId\" [itemIndex]=\"itemIndex\"></simpo-text-editor>\r\n  </div>\r\n  <ng-container *ngIf=\"content.display.showImage\">\r\n    <img loading=\"lazy\" [src]=\"data.image.url\" [alt]=\"data.image.altText\" [simpoCorner]=\"styles?.corners\"\r\n      [id]=\"componentId\" class=\"w-100 img\"\r\n      [attr.simpoObjectPosition]=\"styles?.image?.fit !== 'contain' ? data.image?.position : null\"\r\n      [class]=\"componentId+data.image.id\" [simpoImageDirective]=\"styles?.image\" loading=\"lazy\" [appImageEditor]=\"edit || false\"\r\n      [imageData]=\"data?.image\" [sectionId]=\"componentId\" [simpoObjectPosition]=\"data?.image?.position\" [itemIndex]=\"itemIndex\">\r\n    <!-- <img loading=\"lazy\" [simpoImageDirective]=\"styles?.image\" [simpoCorner]=\"styles?.corners\" [id]=\"data?.id\"\r\n      [class]=\"data?.id+data.image.id\" [simpoObjectPosition]=\"data.image.position\" [src]=\"data.image.url\"\r\n      [alt]=\"data.image.altText\" loading=\"lazy\" [appImageEditor]=\"edit || false\" [imageData]=\"data?.image\"\r\n      [sectionId]=\"data?.id\" class=\"w-100 h-100\" />\r\n  </ng-container> -->\r\n  </ng-container>\r\n  <div class=\"ptb-1 content\" [simpoCorner]=\"styles?.corners\" [id]=\"componentId\"\r\n    [simpoTextBackgroundDirective]=\"styles?.textBackground\">\r\n    <div class=\"heading-medium mb-1\" *ngIf=\"content.display.showHeading\">\r\n      <simpo-text-editor [(value)]=\"data.inputText[0].value \" [editable]=\"edit || false\" [sectionId]=\"componentId\" [inputTextIndex]=\"0\" [itemIndex]=\"itemIndex\" [isRTE]=\"data.inputText[0]?.isRTE\"></simpo-text-editor>\r\n    </div>\r\n    <div class=\"body-desc\" *ngIf=\"content.display.showContent\">\r\n      <simpo-text-editor [(value)]=\"data.inputText[1].value \" [editable]=\"edit || false\" [sectionId]=\"componentId\" [inputTextIndex]=\"1\" [itemIndex]=\"itemIndex\" [isRTE]=\"data.inputText[1]?.isRTE\"></simpo-text-editor>\r\n    </div>\r\n    <div *ngIf=\"content.display.showLink && content.display.linkType === 'Button'\"\r\n      [simpoHoverAnimation]=\"getContentAnimation()\">\r\n      <app-button-element [buttonContent]=\"data.button\" [buttonStyle]=\"button?.styles\" [sectionId]=\"componentId\"\r\n        [buttonId]=\"button ? button.id : ''\" [color]=\"styles?.background?.accentColor\" [edit]=\"edit\"\r\n        [backgroundInfo]=\"styles?.background\"></app-button-element>\r\n    </div>\r\n  </div>\r\n</div>", styles: [".w-100{width:100%}.mb-1{margin-bottom:1rem!important}.content{position:relative;bottom:0;padding:1.5rem;display:flex;flex-direction:column;min-height:100%}.content>div:last-child{margin-top:auto}.parent-tab{position:relative;height:100%;width:100%;display:flex;flex-direction:column}.img{position:absolute;height:100%;display:flex}.popular-tag{position:absolute;top:0;right:0;padding:1px 20px 3px;border-top-left-radius:0!important;border-bottom-right-radius:0!important;z-index:10}\n"] }]
        }], ctorParameters: () => [{ type: i1.EventsService }], propDecorators: { data: [{
                type: Input
            }], styles: [{
                type: Input
            }], content: [{
                type: Input
            }], componentId: [{
                type: Input
            }], button: [{
                type: Input
            }], edit: [{
                type: Input
            }], itemIndex: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 