'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("next/dynamic"),o=require("next/script"),i=require("../common/helpers.js");const s=t(()=>Promise.resolve().then(function(){return require("./Klaviyo/KlaviyoSampleContent.js")}));exports.default=({setting:t,styles:l,builderAttrs:a,style:d})=>{let{klaviyoCodes:n,background:u}=t??{},y=r.useEditorMode();return e.jsxs(e.Fragment,{children:["edit"!==y&&i.getKlaviyoCode(n?.klaviyoCode||"")&&e.jsx(o,{strategy:"lazyOnload",src:i.getKlaviyoScriptUri(i.getKlaviyoCode(n?.klaviyoCode||"")),defer:!0}),e.jsxs("div",{...a,style:{...d,...r.makeStyleResponsive("ta",l?.align),...r.getStyleBackgroundByDevice(u)},className:"gp-h-full gp-w-full",children:[(()=>{let e=i.getKlaviyoFormCode(n?.formCode||"");return n?.isEmbed&&n?.formCode&&"edit"!==y&&e})()&&e.jsx("div",{className:i.getKlaviyoFormCode(n?.formCode||"")}),"edit"===y&&e.jsx(s,{style:l})]})]})};
