import { Component, Input, HostListener } from '@angular/core';
import { SimpoElementsModule } from './../../elements/index';
import { CommonModule } from '@angular/common';
import { SimpoComponentModule } from '../../components/index';
import { MatGridListModule } from '@angular/material/grid-list';
import { AnimationDirective } from '../../directive/animation-directive';
import { BackgroundDirective } from '../../directive/background-directive';
import { ContentFitDirective } from '../../directive/content-fit-directive';
import { BorderDirective } from '../../directive/border-directive';
import { simpoConetenAlignmentDirective } from '../../directive/content-alignment-directive';
import { HoverDirective } from '../../directive/hover-element-directive';
import { OverlayDirective } from '../../directive/overlay-directive';
import { PositionLayoutDirectiveDirective } from '../../directive/position-layout-directive.directive';
import BaseSection from '../BaseSection';
import { SimpoContainerAligment } from '../../directive/container-alignment.directive';
import { TextEditorComponent } from '../../elements/text-editor/text-editor.component';
import { ImageEditorDirective } from '../../directive/image-editor.directive';
import { SpacingHorizontalDirective } from '../../directive/spacing-horizontal.directive';
import { SpacingAroundDirective } from '../../directive/spacing-around.directive';
import * as i0 from "@angular/core";
import * as i1 from "./../../services/events.service";
import * as i2 from "../../elements/svg-divider/svg-divider.component";
import * as i3 from "@angular/common";
import * as i4 from "../../components/hover-elements/hover-elements.component";
import * as i5 from "../../components/delete-hover-element/delete-hover-element.component";
export class BrandStorySectionComponent extends BaseSection {
    constructor(_eventService) {
        super();
        this._eventService = _eventService;
        this.hoveredIndex = null;
        this.deviceWidth = 0;
        this.screenWidth = 0;
        this.getScreenSize();
    }
    getScreenSize(event) {
        if (typeof window !== 'undefined') {
            this.deviceWidth = window.innerWidth;
        }
    }
    ngOnInit() {
        this.deleteSelected = this.delete;
        this.content = this.data?.content;
        this.styles = this.data?.styles;
        if (!this.styles || !this.content)
            return;
        // this.styles.layout.bannerImageDisplay = this.content.image.showImage;
    }
    get stylesLayout() {
        return { ...this.styles?.layout };
    }
    get getJustifyContent() {
        return "justify-content: center !important;";
    }
    editSection() {
        if (window.innerWidth <= 475)
            return;
        this._eventService.toggleEditorEvent.emit(false);
        setTimeout(() => {
            this._eventService.editSection.emit({ data: this.data });
        }, 100);
    }
    getLength() {
        return this.content?.listItem?.data?.length ?? 0;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BrandStorySectionComponent, deps: [{ token: i1.EventsService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: BrandStorySectionComponent, isStandalone: true, selector: "simpo-brand-story-section", inputs: { data: "data", index: "index", edit: "edit", delete: "delete", customClass: "customClass", nextComponentColor: "nextComponentColor" }, host: { listeners: { "window:resize": "getScreenSize($event)" } }, usesInheritance: true, ngImport: i0, template: "<div [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\" class=\"total-container\" [attr.style]=\"customClass\">\r\n    <div [spacingAround]=\"stylesLayout\">\r\n        <div class=\"col-xxl-8  py-5 w-100\" [id]=\"data?.id\" #mainContainer [simpoBorder]=\"styles?.border\"\r\n            [spacingHorizontal]=\"stylesLayout\" [simpoBackground]=\"styles?.background\">\r\n            <div class=\"row g-5\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\" [simpoLayout]=\"styles?.layout\"\r\n                [simpoPositionLayoutDirective]=\"styles?.positionLayout\"\r\n                [ngClass]=\"{ 'align-items-stretch': styles?.positionLayout?.value === 'left' || styles?.positionLayout?.value === 'right' }\"\r\n                [simpoOverlay]=\"styles?.background\">\r\n\r\n                <div class=\"col-10 col-sm-8 col-lg-6 sticky-left-column\" [simpoContainerAlignment]=\"stylesLayout\">\r\n                    <simpo-text-editor [(value)]=\"content.inputText[0].value\"\r\n                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"0\" [isRTE]=\"content?.inputText[0]?.isRTE\"></simpo-text-editor>\r\n                    <simpo-text-editor [(value)]=\"content.inputText[1].value\"\r\n                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"1\" [isRTE]=\"content?.inputText[1]?.isRTE\"></simpo-text-editor>\r\n\r\n                </div>\r\n                <div class=\"d-flex flex-column justify-content-start gap-15 content-side sticky-right-column\"\r\n                    [simpoContainerAlignment]=\"stylesLayout\" [id]=\"data?.id\"\r\n                    [simpoContentAlignment]=\"styles?.contentAlignment\" [class.col-lg-10]=\"!content?.image?.showImage\"\r\n                    [class.col-lg-6]=\"content?.image?.showImage\">\r\n                    <ng-container>\r\n                        <simpo-text-editor [(value)]=\"content.inputText[2].value\"\r\n                            [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"2\" [isRTE]=\"content?.inputText[2]?.isRTE\"></simpo-text-editor>\r\n                        <div class=\"d-flex flex-wrap justify-content-between\">\r\n                            <div *ngFor=\"let item of content?.listItem?.data; let i = index\" class=\"carder\">\r\n                                <div class=\"card_wrapper\">\r\n                                    <div class=\"container_card\">\r\n                                        <div class=\"card-section\">\r\n                                            <!-- Text content -->\r\n                                            <div class=\"content-wrapper\">\r\n                                                <div class=\"third-part-card\">\r\n                                                    <simpo-text-editor [(value)]=\"item.inputText[1].value\"\r\n                                                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"1\" [itemIndex]=\"i\" [isRTE]=\"item.inputText[1]?.isRTE\"></simpo-text-editor>\r\n                                                    <simpo-text-editor [(value)]=\"item.inputText[2].value\"\r\n                                                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"2\" [itemIndex]=\"i\" [isRTE]=\"item.inputText[2]?.isRTE\"></simpo-text-editor>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </ng-container>\r\n\r\n                    <!-- <ng-container *ngIf=\"styles?.processSectionDisplayStyle == 'STYLE2'\">\r\n                        <div *ngFor=\"let item of content?.listItem?.data; let i = index\" class=\"carder\">\r\n                            <div class=\"step-container\">\r\n                                <div class=\"step\">\r\n                                    <div class=\"step-section d-flex gap-3\">\r\n                                        <div class=\"d-flex flex-column align-items-center\">\r\n                                            <div class=\"gradient-stroke-text mb-1\" [attr.data-text]=\"i+1\" [ngStyle]=\"{\r\n                      color: 'transparent',\r\n                      fontWeight: '900',\r\n                      fontSize: '36px',\r\n                      WebkitTextStroke: '2px ' + styles?.background?.accentColor\r\n                    }\">{{ i+1 | number: '2.0' }}</div>\r\n                                            <div class=\"height-width\"\r\n                                                [style.background]=\"styles?.background?.accentColor\"\r\n                                                *ngIf=\" i != getLength()-1\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"third-part-card w-100\">\r\n                                            <simpo-text-editor [(value)]=\"item.inputText[1].value\"\r\n                                                [editable]=\"edit || false\"></simpo-text-editor>\r\n                                            <simpo-text-editor [(value)]=\"item.inputText[2].value\"\r\n                                                [editable]=\"edit || false\"></simpo-text-editor>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </ng-container> -->\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n    <ng-container *ngIf=\"styles?.devider?.display\">\r\n        <simpo-svg-divider [dividerType]=\"styles?.devider?.deviderType\"\r\n            [color]=\"nextComponentColor?.color\"></simpo-svg-divider>\r\n    </ng-container>\r\n    <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n        <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n    </div>\r\n    <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n        <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n    </div>\r\n</div>", styles: [".btn-primary{border:none}.hover_effect{position:unset;width:100%;top:0;left:0;height:100%}.total-container{position:relative;height:auto}.button-display{display:flex;gap:10px}.gap-15{gap:15px}.container_card .card-section{position:relative;display:flex;align-items:stretch;justify-content:space-between}@media only screen and (max-width: 475px){.col-10{width:100%;height:32vh;padding-right:13px;padding-left:13px}.container_card .card-section{display:flex;flex-direction:column;align-items:flex-start;gap:20px;padding:10px;border:1px solid rgba(116,33,252,.1);border-radius:10px;opacity:0;transform:translateY(150px);transition:2s all ease}}.text-element{inline-size:100%;overflow-wrap:break-word}.card_wrapper{display:flex;flex-direction:column;gap:20px}.visible{visibility:visible!important}.visible .card-section{opacity:1;transform:translateY(0)}.first-part-card{min-width:fit-content;text-align:left}.content-wrapper{flex:1;display:flex;gap:10px;min-width:0}.first-part-card .body-large{font-size:1.1rem;font-weight:700}.right-panel{flex:0 0 28%;max-width:28%;position:relative;display:flex;align-items:center;justify-content:flex-end;align-self:stretch;min-height:60px}.arrow-icon{font-size:20px;color:#aaa;transition:opacity .2s ease,visibility .2s ease;opacity:1;visibility:visible}.arrow-icon.hidden{opacity:0;visibility:hidden}.hover-image-wrap{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s ease;border-radius:10px;overflow:hidden}.hover-image-wrap.visible-img{opacity:1;visibility:visible}.hover-image-wrap img{width:100%;height:100%;object-fit:contain;border-radius:10px;display:block}.third-part-card .heading-large{font-size:1.1rem;font-weight:700}.third-part-card .body-large{font-size:12px;font-weight:400;line-height:15px}.third-part-card{display:flex;flex-direction:column;gap:10px}:host ::ng-deep .gradient-stroke-text{font-family:Arial Black,sans-serif;position:relative;bottom:4px}.height-width{width:3px;flex-grow:1;display:flex;position:relative;flex-direction:column;bottom:6px}.step-section{align-items:stretch;flex:1 1 auto}@media (min-width: 992px){.sticky-left-column{position:sticky;top:100px;align-self:flex-start;z-index:10}.carder{width:100%}}.carder{width:49.5%;padding:28px 20px;background-color:#f5f5f5;margin-bottom:6px;border-radius:10px}\n"], dependencies: [{ kind: "ngmodule", type: SimpoElementsModule }, { kind: "component", type: i2.SvgDividerComponent, selector: "simpo-svg-divider", inputs: ["dividerType", "color"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: i4.HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged", "isEcommerce"], outputs: ["edit"] }, { kind: "component", type: i5.DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "component", type: TextEditorComponent, selector: "simpo-text-editor", inputs: ["value", "editable", "isRTE", "sectionId", "label", "type", "inputTextIndex", "itemIndex"], outputs: ["valueChange"] }, { kind: "ngmodule", type: MatGridListModule }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: SimpoContainerAligment, selector: "[simpoContainerAlignment]", inputs: ["simpoContainerAlignment"] }, { kind: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: BorderDirective, selector: "[simpoBorder]", inputs: ["simpoBorder"] }, { kind: "directive", type: simpoConetenAlignmentDirective, selector: "[simpoContentAlignment]", inputs: ["simpoContentAlignment"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }, { kind: "directive", type: PositionLayoutDirectiveDirective, selector: "[simpoPositionLayoutDirective]", inputs: ["simpoPositionLayoutDirective"] }, { kind: "directive", type: SpacingHorizontalDirective, selector: "[spacingHorizontal]", inputs: ["spacingHorizontal", "isHeader"] }, { kind: "directive", type: SpacingAroundDirective, selector: "[spacingAround]", inputs: ["spacingAround", "backgroundInfo"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BrandStorySectionComponent, decorators: [{
            type: Component,
            args: [{ selector: 'simpo-brand-story-section', standalone: true, imports: [
                        SimpoElementsModule,
                        CommonModule,
                        SimpoComponentModule,
                        TextEditorComponent,
                        MatGridListModule,
                        AnimationDirective,
                        SimpoContainerAligment,
                        BackgroundDirective,
                        BorderDirective,
                        simpoConetenAlignmentDirective,
                        ContentFitDirective,
                        HoverDirective,
                        OverlayDirective,
                        PositionLayoutDirectiveDirective,
                        SpacingHorizontalDirective,
                        ImageEditorDirective,
                        SpacingAroundDirective
                    ], template: "<div [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\" class=\"total-container\" [attr.style]=\"customClass\">\r\n    <div [spacingAround]=\"stylesLayout\">\r\n        <div class=\"col-xxl-8  py-5 w-100\" [id]=\"data?.id\" #mainContainer [simpoBorder]=\"styles?.border\"\r\n            [spacingHorizontal]=\"stylesLayout\" [simpoBackground]=\"styles?.background\">\r\n            <div class=\"row g-5\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\" [simpoLayout]=\"styles?.layout\"\r\n                [simpoPositionLayoutDirective]=\"styles?.positionLayout\"\r\n                [ngClass]=\"{ 'align-items-stretch': styles?.positionLayout?.value === 'left' || styles?.positionLayout?.value === 'right' }\"\r\n                [simpoOverlay]=\"styles?.background\">\r\n\r\n                <div class=\"col-10 col-sm-8 col-lg-6 sticky-left-column\" [simpoContainerAlignment]=\"stylesLayout\">\r\n                    <simpo-text-editor [(value)]=\"content.inputText[0].value\"\r\n                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"0\" [isRTE]=\"content?.inputText[0]?.isRTE\"></simpo-text-editor>\r\n                    <simpo-text-editor [(value)]=\"content.inputText[1].value\"\r\n                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"1\" [isRTE]=\"content?.inputText[1]?.isRTE\"></simpo-text-editor>\r\n\r\n                </div>\r\n                <div class=\"d-flex flex-column justify-content-start gap-15 content-side sticky-right-column\"\r\n                    [simpoContainerAlignment]=\"stylesLayout\" [id]=\"data?.id\"\r\n                    [simpoContentAlignment]=\"styles?.contentAlignment\" [class.col-lg-10]=\"!content?.image?.showImage\"\r\n                    [class.col-lg-6]=\"content?.image?.showImage\">\r\n                    <ng-container>\r\n                        <simpo-text-editor [(value)]=\"content.inputText[2].value\"\r\n                            [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"2\" [isRTE]=\"content?.inputText[2]?.isRTE\"></simpo-text-editor>\r\n                        <div class=\"d-flex flex-wrap justify-content-between\">\r\n                            <div *ngFor=\"let item of content?.listItem?.data; let i = index\" class=\"carder\">\r\n                                <div class=\"card_wrapper\">\r\n                                    <div class=\"container_card\">\r\n                                        <div class=\"card-section\">\r\n                                            <!-- Text content -->\r\n                                            <div class=\"content-wrapper\">\r\n                                                <div class=\"third-part-card\">\r\n                                                    <simpo-text-editor [(value)]=\"item.inputText[1].value\"\r\n                                                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"1\" [itemIndex]=\"i\" [isRTE]=\"item.inputText[1]?.isRTE\"></simpo-text-editor>\r\n                                                    <simpo-text-editor [(value)]=\"item.inputText[2].value\"\r\n                                                        [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"2\" [itemIndex]=\"i\" [isRTE]=\"item.inputText[2]?.isRTE\"></simpo-text-editor>\r\n                                                </div>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </ng-container>\r\n\r\n                    <!-- <ng-container *ngIf=\"styles?.processSectionDisplayStyle == 'STYLE2'\">\r\n                        <div *ngFor=\"let item of content?.listItem?.data; let i = index\" class=\"carder\">\r\n                            <div class=\"step-container\">\r\n                                <div class=\"step\">\r\n                                    <div class=\"step-section d-flex gap-3\">\r\n                                        <div class=\"d-flex flex-column align-items-center\">\r\n                                            <div class=\"gradient-stroke-text mb-1\" [attr.data-text]=\"i+1\" [ngStyle]=\"{\r\n                      color: 'transparent',\r\n                      fontWeight: '900',\r\n                      fontSize: '36px',\r\n                      WebkitTextStroke: '2px ' + styles?.background?.accentColor\r\n                    }\">{{ i+1 | number: '2.0' }}</div>\r\n                                            <div class=\"height-width\"\r\n                                                [style.background]=\"styles?.background?.accentColor\"\r\n                                                *ngIf=\" i != getLength()-1\">\r\n                                            </div>\r\n                                        </div>\r\n                                        <div class=\"third-part-card w-100\">\r\n                                            <simpo-text-editor [(value)]=\"item.inputText[1].value\"\r\n                                                [editable]=\"edit || false\"></simpo-text-editor>\r\n                                            <simpo-text-editor [(value)]=\"item.inputText[2].value\"\r\n                                                [editable]=\"edit || false\"></simpo-text-editor>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </ng-container> -->\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n    <ng-container *ngIf=\"styles?.devider?.display\">\r\n        <simpo-svg-divider [dividerType]=\"styles?.devider?.deviderType\"\r\n            [color]=\"nextComponentColor?.color\"></simpo-svg-divider>\r\n    </ng-container>\r\n    <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n        <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n    </div>\r\n    <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n        <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n    </div>\r\n</div>", styles: [".btn-primary{border:none}.hover_effect{position:unset;width:100%;top:0;left:0;height:100%}.total-container{position:relative;height:auto}.button-display{display:flex;gap:10px}.gap-15{gap:15px}.container_card .card-section{position:relative;display:flex;align-items:stretch;justify-content:space-between}@media only screen and (max-width: 475px){.col-10{width:100%;height:32vh;padding-right:13px;padding-left:13px}.container_card .card-section{display:flex;flex-direction:column;align-items:flex-start;gap:20px;padding:10px;border:1px solid rgba(116,33,252,.1);border-radius:10px;opacity:0;transform:translateY(150px);transition:2s all ease}}.text-element{inline-size:100%;overflow-wrap:break-word}.card_wrapper{display:flex;flex-direction:column;gap:20px}.visible{visibility:visible!important}.visible .card-section{opacity:1;transform:translateY(0)}.first-part-card{min-width:fit-content;text-align:left}.content-wrapper{flex:1;display:flex;gap:10px;min-width:0}.first-part-card .body-large{font-size:1.1rem;font-weight:700}.right-panel{flex:0 0 28%;max-width:28%;position:relative;display:flex;align-items:center;justify-content:flex-end;align-self:stretch;min-height:60px}.arrow-icon{font-size:20px;color:#aaa;transition:opacity .2s ease,visibility .2s ease;opacity:1;visibility:visible}.arrow-icon.hidden{opacity:0;visibility:hidden}.hover-image-wrap{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s ease;border-radius:10px;overflow:hidden}.hover-image-wrap.visible-img{opacity:1;visibility:visible}.hover-image-wrap img{width:100%;height:100%;object-fit:contain;border-radius:10px;display:block}.third-part-card .heading-large{font-size:1.1rem;font-weight:700}.third-part-card .body-large{font-size:12px;font-weight:400;line-height:15px}.third-part-card{display:flex;flex-direction:column;gap:10px}:host ::ng-deep .gradient-stroke-text{font-family:Arial Black,sans-serif;position:relative;bottom:4px}.height-width{width:3px;flex-grow:1;display:flex;position:relative;flex-direction:column;bottom:6px}.step-section{align-items:stretch;flex:1 1 auto}@media (min-width: 992px){.sticky-left-column{position:sticky;top:100px;align-self:flex-start;z-index:10}.carder{width:100%}}.carder{width:49.5%;padding:28px 20px;background-color:#f5f5f5;margin-bottom:6px;border-radius:10px}\n"] }]
        }], ctorParameters: () => [{ type: i1.EventsService }], propDecorators: { data: [{
                type: Input
            }], index: [{
                type: Input
            }], edit: [{
                type: Input
            }], delete: [{
                type: Input
            }], customClass: [{
                type: Input
            }], nextComponentColor: [{
                type: Input
            }], getScreenSize: [{
                type: HostListener,
                args: ['window:resize', ['$event']]
            }] } });
//# sourceMappingURL=data:application/json;base64, 