'use client';
import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useEditorMode as d,useProduct as i,makeStyleResponsive as r}from"@gem-sdk/core";import m from"next/dynamic";import{useMemo as a}from"react";let JudgemeSampleContent=m(()=>import("./JudgemeSampleContent.js")),JudgemeSingleProduct=({setting:m,styles:g})=>{let o=d(),l=i(),n=l?.baseID?.replace("gid://shopify/Product/",""),s=a(()=>{switch(m?.widgetType){case"single_product_preview_badge":return{className:"jdgm-widget jdgm-preview-badge","data-id":n};case"review_widget":return{className:"jdgm-widget jdgm-review-widget jdgm-outside-widget","data-product-title":l?.title,"data-id":n}}},[n,l?.title,m?.widgetType]);return e(t,{children:e("div",{style:{...r("ta",g?.align)},...s,children:"edit"===o&&e(JudgemeSampleContent,{setting:m,styles:g})})})};export{JudgemeSingleProduct as default};
