'use client';
import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import{useEditorMode as r,getStyleBackgroundByDevice as l,makeStyleResponsive as i}from"@gem-sdk/core";import m from"next/dynamic";import a from"next/script";import{getKlaviyoCode as d,getKlaviyoScriptUri as s,getKlaviyoFormCode as n}from"../common/helpers.js";let f=m(()=>import("./Klaviyo/KlaviyoSampleContent.js")),p=({setting:m,styles:p,builderAttrs:c,style:y})=>{let{klaviyoCodes:v,background:u}=m??{},C=r();return e(o,{children:["edit"!==C&&d(v?.klaviyoCode||"")&&t(a,{strategy:"lazyOnload",src:s(d(v?.klaviyoCode||"")),defer:!0}),e("div",{...c,style:{...y,...i("ta",p?.align),...l(u)},className:"gp-h-full gp-w-full",children:[(()=>{let e=n(v?.formCode||"");return v?.isEmbed&&v?.formCode&&"edit"!==C&&e})()&&t("div",{className:n(v?.formCode||"")}),"edit"===C&&t(f,{style:p})]})]})};export{p as default};
