import { Component, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SimpoElementsModule } from '../../elements/index';
import { SimpoComponentModule } from '../../components/index';
import { TextEditorComponent } from '../../elements/text-editor/text-editor.component';
import { BackgroundDirective } from '../../directive/background-directive';
import { HoverDirective } from '../../directive/hover-element-directive';
import { OverlayDirective } from '../../directive/overlay-directive';
import { BorderDirective } from '../../directive/border-directive';
import { SpacingHorizontalDirective } from '../../directive/spacing-horizontal.directive';
import { ContentFitDirective } from '../../directive/content-fit-directive';
import BaseSection from '../BaseSection';
import { ImageEditorDirective } from '../../directive/image-editor.directive';
import { IconDirectiveDirective } from '../../directive/icon-directive.directive';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../elements/simpo-button/simpo-button.component";
import * as i3 from "../../elements/svg-divider/svg-divider.component";
import * as i4 from "../../components/hover-elements/hover-elements.component";
import * as i5 from "../../components/delete-hover-element/delete-hover-element.component";
export class CondensedAndGradientComponent extends BaseSection {
    ngOnInit() {
        this.content = this.data?.content;
        this.style = this.data?.styles;
    }
    get stylesLayout() {
        return { ...this.style?.layout };
    }
    getIconBackground(icon) {
        if (icon?.backgroundType === 'Gradient') {
            const direction = icon?.backgroundGradientDirection || 'to bottom';
            return `linear-gradient(${direction}, ${icon?.backgroundColor}, ${icon?.secondaryColor})`;
        }
        return icon?.backgroundColor;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CondensedAndGradientComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CondensedAndGradientComponent, isStandalone: true, selector: "simpo-condensed-and-gradient", inputs: { edit: "edit", data: "data", customClass: "customClass", nextComponentColor: "nextComponentColor", index: "index", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<section>\r\n  <div [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\" class=\"sale-wrapper total-container\"\r\n    [attr.style]=\"customClass\" [simpoBackground]=\"style?.background\">\r\n    <div #mainContainer [id]=\"data?.id\" [spacingHorizontal]=\"stylesLayout\" [simpoLayout]=\"style?.layout\"\r\n      class=\"sale-bar\" [simpoOverlay]=\"style?.background\">\r\n\r\n      <!-- LEFT -->\r\n      <div class=\"left-section\">\r\n        <div class=\"logo\"\r\n          [style.background]=\"content?.icon?.showBackground ? getIconBackground(content?.icon) : 'transparent'\"\r\n          [appImageEditor]=\"edit || false\" [iconData]=\"content?.icon\" [sectionId]=\"data?.id\" [showIcon]=\"true\">\r\n          <div [iconId]=\"data?.id + (content?.icon?.id || '')\" [simpoIconDirective]=\"content?.icon\" class=\"w-75 h-75\">\r\n          </div>\r\n        </div>\r\n\r\n        <div class=\"text\">\r\n          <div class=\"sale-text\">\r\n            <simpo-text-editor [(value)]=\"content.inputText[0].value\" [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"0\" [isRTE]=\"content?.inputText[0]?.isRTE\"></simpo-text-editor>\r\n          </div>\r\n\r\n          <div class=\"sale-description\">\r\n            <simpo-text-editor [(value)]=\"content.inputText[1].value\" [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"1\" [isRTE]=\"content?.inputText[1]?.isRTE\"></simpo-text-editor>\r\n          </div>\r\n        </div>\r\n      </div>\r\n\r\n      <!-- RIGHT BUTTON -->\r\n      <div class=\"sale-action\" *ngIf=\"data?.action?.display\">\r\n        <div *ngFor=\"let button of data?.action?.buttons\">\r\n          <app-button-element [buttonContent]=\"button.content\" [buttonStyle]=\"button.styles\" [buttonId]=\"button.id\"\r\n            [sectionId]=\"data?.id\" [color]=\"data?.styles?.background?.accentColor\" [edit]=\"edit\"\r\n            [backgroundInfo]=\"data?.styles?.background\">\r\n          </app-button-element>\r\n        </div>\r\n      </div>\r\n    </div>\r\n\r\n    <!-- Divider -->\r\n    <ng-container *ngIf=\"style?.devider?.display\">\r\n      <simpo-svg-divider [dividerType]=\"style?.devider?.deviderType\"\r\n        [color]=\"nextComponentColor?.color\"></simpo-svg-divider>\r\n    </ng-container>\r\n\r\n    <!-- EDIT SELECTOR -->\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\r\n    <!-- DELETE -->\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>\r\n</section>", styles: [".sale-wrapper{width:100%}.total-container{height:auto;position:relative}.sale-bar{width:100%;display:flex;justify-content:space-between;align-items:center;padding:28px 50px}.left-section{display:flex;align-items:center;gap:14px;width:47%;min-width:320px}.sale-text{font-size:26px;font-weight:600;width:100%;display:block;text-align:left}.sale-description{width:100%;display:block;font-size:16px;opacity:.9;text-align:left;min-height:20px}.text{flex:1;width:100%;min-width:260px;text-align:left}.sale-timer{display:flex;gap:18px}.left-section{display:flex;justify-content:space-between;width:47%}.logo{width:60px;height:60px;min-width:60px;border-radius:50%;display:flex;align-items:center;justify-content:center}.time-card{background-color:#fff;color:#1c2a39;padding:6px 14px;border-radius:8px;text-align:center;min-width:60px}.time-card span{display:block;font-size:18px;font-weight:600}.time-card small{font-size:11px;letter-spacing:1px;font-weight:500}.sale-action{display:flex;align-items:center;gap:20px}.shop-button{background-color:#fff;color:#1c2a39;border:none;padding:5px 14px;border-radius:30px;font-size:14px;font-weight:500;cursor:pointer;transition:.3s ease}.shop-button:hover{background-color:#f2f2f2}.close-icon{font-size:20px;cursor:pointer;opacity:.8}.close-icon:hover{opacity:1}@media (max-width: 768px){.sale-bar{flex-direction:column;align-items:center;text-align:center;padding:20px;gap:18px}.left-section{width:100%;flex-direction:row;align-items:center;gap:12px}.logo{width:22%;height:60px}.editor-container{text-align:start}.text{text-align:start;width:100%}.sale-text{font-size:20px}.sale-description{font-size:14px;opacity:.9}.sale-action{width:100%;justify-content:center}}@media (min-width: 769px) and (max-width: 1024px){.sale-bar{padding:22px 30px;gap:20px}.left-section{width:65%;gap:15px}.logo{width:55px;height:55px}.sale-text{font-size:22px}.sale-description{font-size:15px}.sale-action{align-items:center}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: SimpoElementsModule }, { kind: "component", type: i2.SimpoButtonComponent, selector: "app-button-element", inputs: ["buttonContent", "buttonStyle", "buttonId", "color", "sectionId", "edit", "backgroundInfo", "disabled", "loading", "isFullWidth"] }, { kind: "component", type: i3.SvgDividerComponent, selector: "simpo-svg-divider", inputs: ["dividerType", "color"] }, { 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: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }, { kind: "directive", type: SpacingHorizontalDirective, selector: "[spacingHorizontal]", inputs: ["spacingHorizontal", "isHeader"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "directive", type: ImageEditorDirective, selector: "[appImageEditor]", inputs: ["appImageEditor", "imageData", "sectionId", "showIcon", "iconData", "itemIndex"] }, { kind: "directive", type: IconDirectiveDirective, selector: "[simpoIconDirective]", inputs: ["simpoIconDirective", "iconId"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CondensedAndGradientComponent, decorators: [{
            type: Component,
            args: [{ selector: 'simpo-condensed-and-gradient', standalone: true, imports: [
                        CommonModule,
                        SimpoElementsModule,
                        SimpoComponentModule,
                        TextEditorComponent,
                        BackgroundDirective,
                        HoverDirective,
                        OverlayDirective,
                        SpacingHorizontalDirective,
                        BorderDirective,
                        ContentFitDirective,
                        ImageEditorDirective,
                        IconDirectiveDirective
                    ], template: "<section>\r\n  <div [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\" class=\"sale-wrapper total-container\"\r\n    [attr.style]=\"customClass\" [simpoBackground]=\"style?.background\">\r\n    <div #mainContainer [id]=\"data?.id\" [spacingHorizontal]=\"stylesLayout\" [simpoLayout]=\"style?.layout\"\r\n      class=\"sale-bar\" [simpoOverlay]=\"style?.background\">\r\n\r\n      <!-- LEFT -->\r\n      <div class=\"left-section\">\r\n        <div class=\"logo\"\r\n          [style.background]=\"content?.icon?.showBackground ? getIconBackground(content?.icon) : 'transparent'\"\r\n          [appImageEditor]=\"edit || false\" [iconData]=\"content?.icon\" [sectionId]=\"data?.id\" [showIcon]=\"true\">\r\n          <div [iconId]=\"data?.id + (content?.icon?.id || '')\" [simpoIconDirective]=\"content?.icon\" class=\"w-75 h-75\">\r\n          </div>\r\n        </div>\r\n\r\n        <div class=\"text\">\r\n          <div class=\"sale-text\">\r\n            <simpo-text-editor [(value)]=\"content.inputText[0].value\" [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"0\" [isRTE]=\"content?.inputText[0]?.isRTE\"></simpo-text-editor>\r\n          </div>\r\n\r\n          <div class=\"sale-description\">\r\n            <simpo-text-editor [(value)]=\"content.inputText[1].value\" [editable]=\"edit || false\" [sectionId]=\"data?.id\" [inputTextIndex]=\"1\" [isRTE]=\"content?.inputText[1]?.isRTE\"></simpo-text-editor>\r\n          </div>\r\n        </div>\r\n      </div>\r\n\r\n      <!-- RIGHT BUTTON -->\r\n      <div class=\"sale-action\" *ngIf=\"data?.action?.display\">\r\n        <div *ngFor=\"let button of data?.action?.buttons\">\r\n          <app-button-element [buttonContent]=\"button.content\" [buttonStyle]=\"button.styles\" [buttonId]=\"button.id\"\r\n            [sectionId]=\"data?.id\" [color]=\"data?.styles?.background?.accentColor\" [edit]=\"edit\"\r\n            [backgroundInfo]=\"data?.styles?.background\">\r\n          </app-button-element>\r\n        </div>\r\n      </div>\r\n    </div>\r\n\r\n    <!-- Divider -->\r\n    <ng-container *ngIf=\"style?.devider?.display\">\r\n      <simpo-svg-divider [dividerType]=\"style?.devider?.deviderType\"\r\n        [color]=\"nextComponentColor?.color\"></simpo-svg-divider>\r\n    </ng-container>\r\n\r\n    <!-- EDIT SELECTOR -->\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\r\n    <!-- DELETE -->\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>\r\n</section>", styles: [".sale-wrapper{width:100%}.total-container{height:auto;position:relative}.sale-bar{width:100%;display:flex;justify-content:space-between;align-items:center;padding:28px 50px}.left-section{display:flex;align-items:center;gap:14px;width:47%;min-width:320px}.sale-text{font-size:26px;font-weight:600;width:100%;display:block;text-align:left}.sale-description{width:100%;display:block;font-size:16px;opacity:.9;text-align:left;min-height:20px}.text{flex:1;width:100%;min-width:260px;text-align:left}.sale-timer{display:flex;gap:18px}.left-section{display:flex;justify-content:space-between;width:47%}.logo{width:60px;height:60px;min-width:60px;border-radius:50%;display:flex;align-items:center;justify-content:center}.time-card{background-color:#fff;color:#1c2a39;padding:6px 14px;border-radius:8px;text-align:center;min-width:60px}.time-card span{display:block;font-size:18px;font-weight:600}.time-card small{font-size:11px;letter-spacing:1px;font-weight:500}.sale-action{display:flex;align-items:center;gap:20px}.shop-button{background-color:#fff;color:#1c2a39;border:none;padding:5px 14px;border-radius:30px;font-size:14px;font-weight:500;cursor:pointer;transition:.3s ease}.shop-button:hover{background-color:#f2f2f2}.close-icon{font-size:20px;cursor:pointer;opacity:.8}.close-icon:hover{opacity:1}@media (max-width: 768px){.sale-bar{flex-direction:column;align-items:center;text-align:center;padding:20px;gap:18px}.left-section{width:100%;flex-direction:row;align-items:center;gap:12px}.logo{width:22%;height:60px}.editor-container{text-align:start}.text{text-align:start;width:100%}.sale-text{font-size:20px}.sale-description{font-size:14px;opacity:.9}.sale-action{width:100%;justify-content:center}}@media (min-width: 769px) and (max-width: 1024px){.sale-bar{padding:22px 30px;gap:20px}.left-section{width:65%;gap:15px}.logo{width:55px;height:55px}.sale-text{font-size:22px}.sale-description{font-size:15px}.sale-action{align-items:center}}\n"] }]
        }], propDecorators: { edit: [{
                type: Input
            }], data: [{
                type: Input
            }], customClass: [{
                type: Input
            }], nextComponentColor: [{
                type: Input
            }], index: [{
                type: Input
            }], delete: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 