'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"),React=require("react");const JudgemeSampleContent=dynamic(()=>Promise.resolve().then(function(){return require("./JudgemeSampleContent.js")})),JudgemeSingleProduct=({setting:e,styles:t})=>{let i=core.useEditorMode(),r=core.useProduct(),d=r?.baseID?.replace("gid://shopify/Product/",""),s=React.useMemo(()=>{switch(e?.widgetType){case"single_product_preview_badge":return{className:"jdgm-widget jdgm-preview-badge","data-id":d};case"review_widget":return{className:"jdgm-widget jdgm-review-widget jdgm-outside-widget","data-product-title":r?.title,"data-id":d}}},[d,r?.title,e?.widgetType]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{style:{...core.makeStyleResponsive("ta",t?.align)},...s,children:"edit"===i&&jsxRuntime.jsx(JudgemeSampleContent,{setting:e,styles:t})})})};exports.default=JudgemeSingleProduct;
