'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 LooxReviewsSampleContent=dynamic(()=>Promise.resolve().then(function(){return require("./LooxReviewsSampleContent.js")})),LooxReviewsSingleProduct=({setting:e,styles:t})=>{let r=core.useEditorMode(),i=core.useProduct(),s=i?.baseID?.replace("gid://shopify/Product/",""),o=React.useMemo(()=>{switch(e?.widgetType){case"product_reviews_widget":return{id:"looxReviews","data-product-id":s};case"product_star_ratings_widget":return{className:"loox-rating","data-id":s,"data-fetch":""}}},[s,e?.widgetType]);return jsxRuntime.jsxs("div",{style:{...core.makeStyleResponsive("ta",t?.align)},children:["edit"===r&&jsxRuntime.jsx(LooxReviewsSampleContent,{setting:e,styles:t}),jsxRuntime.jsx("div",{...o})]})};exports.default=LooxReviewsSingleProduct;
