'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),dynamic=require("next/dynamic"),Script=require("next/script"),helpers=require("../common/helpers.js");const YotpoLoyaltySampleContent=dynamic(()=>Promise.resolve().then(function(){return require("./YotpoLoyalty/YotpoLoyaltySampleContent.js")})),YotpoLoyalty=({setting:e,styles:t,builderAttrs:o,style:r})=>{let{yotpoLoyaltyCodes:s}=e??{},i=core.useEditorMode();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["edit"!==i&&s?.guid&&jsxRuntime.jsx(Script,{strategy:"lazyOnload",src:helpers.getYotpoUri(s?.guid),defer:!0}),jsxRuntime.jsxs("div",{...o,style:{...r,...core.makeStyleResponsive("ta",t?.align)},className:"gp-h-full gp-w-full",children:[s?.yotpoWidget&&jsxRuntime.jsx("div",{className:"yotpo-widget-instance","data-yotpo-instance-id":helpers.getYotpoFormCode(s?.yotpoWidget)}),"edit"===i&&jsxRuntime.jsx(YotpoLoyaltySampleContent,{style:t})]})]})};exports.default=YotpoLoyalty;
