'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Script=require("next/script"),dynamic=require("next/dynamic");const LooxReviewsSingleProduct=dynamic(()=>Promise.resolve().then(function(){return require("./LooxReviews/SingleProduct.js")})),LooxReviewsWithoutProduct=dynamic(()=>Promise.resolve().then(function(){return require("./LooxReviews/WithoutProduct.js")})),InstantLooxReviews=({setting:e,styles:t,builderProps:r})=>{let{widgetType:s}=e??{},{storefrontUrl:i}=core.useStoreFront(),o=i?.replace("https://","")?.replace("http://","")?.split("/")?.[0];return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Script,{defer:!0,strategy:"lazyOnload",src:`//loox.io/widget/loox.js?shop=${o}`}),"product_reviews_widget"===s||"product_star_ratings_widget"===s?jsxRuntime.jsx(LooxReviewsSingleProduct,{setting:e,styles:t,builderProps:r}):jsxRuntime.jsx(LooxReviewsWithoutProduct,{setting:e,styles:t,builderProps:r})]})};exports.default=InstantLooxReviews;
