'use client';
import{jsxs as t,Fragment as o,jsx as e}from"react/jsx-runtime";import{useEditorMode as a,makeStyleResponsive as l}from"@gem-sdk/core";import i from"next/dynamic";import p from"next/script";import{getYotpoUri as r,getYotpoFormCode as m}from"../common/helpers.js";let YotpoLoyaltySampleContent=i(()=>import("./YotpoLoyalty/YotpoLoyaltySampleContent.js")),YotpoLoyalty=({setting:i,styles:y,builderAttrs:n,style:d})=>{let{yotpoLoyaltyCodes:s}=i??{},c=a();return t(o,{children:["edit"!==c&&s?.guid&&e(p,{strategy:"lazyOnload",src:r(s?.guid),defer:!0}),t("div",{...n,style:{...d,...l("ta",y?.align)},className:"gp-h-full gp-w-full",children:[s?.yotpoWidget&&e("div",{className:"yotpo-widget-instance","data-yotpo-instance-id":m(s?.yotpoWidget)}),"edit"===c&&e(YotpoLoyaltySampleContent,{style:y})]})]})};export{YotpoLoyalty as default};
