'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 n from"next/script";import{getYotpoUri as p,getYotpoFormCode as r}from"../common/helpers.js";let YotpoLoyaltySampleContent=i(()=>import("./YotpoLoyalty/YotpoLoyaltySampleContent.js")),InstantYotpoLoyalty=({setting:i,styles:m,builderAttrs:y,style:s})=>{let{yotpoLoyaltyCodes:d}=i??{},c=a();return t(o,{children:["edit"!==c&&d?.guid&&e(n,{strategy:"lazyOnload",src:p(d?.guid),defer:!0}),t("div",{...y,style:{...s,...l("ta",m?.align)},className:"gp-h-full gp-w-full",children:[d?.yotpoWidget&&e("div",{className:"yotpo-widget-instance","data-yotpo-instance-id":r(d?.yotpoWidget)}),"edit"===c&&e(YotpoLoyaltySampleContent,{style:m})]})]})};export{InstantYotpoLoyalty as default};
