'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Text=require("../../../text/components/Text.js"),system=require("@gem-sdk/system"),classes=require("./common/classes.js"),attrs=require("./common/attrs.js"),helpers=require("./common/helpers.js"),useGpPrice=require("./hooks/useGpPrice.js"),core=require("@gem-sdk/core");const ProductPrice=e=>{let{style:s,children:r}=e,t=core.useEditorMode(),{t:i}=core.useI18nStore(),c="edit"===t,{elementRef:o,moneyFormatted:u,currentProductId:a,isNoComparePrice:m,isNoComparePriceILP:n,shouldHiddenComparePrice:l,emitNoDataSignal:x}=useGpPrice.useGpPrice(e),d=system.createClass(classes.getWrapperClasses(e)),p=system.createAttr(attrs.getAttrs(e,{isILP:!c,productId:a,shouldHiddenComparePrice:l})),j=helpers.getTextProps(e,u),g={visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0},h=n?g:s;return jsxRuntime.jsxs("div",{ref:o,...p,className:d,style:h,"aria-hidden":"true",onClick:x,children:[m&&c?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"gp-flex-col gp-flex gp-justify-between gp-p-2",children:jsxRuntime.jsx("p",{className:"gp-text-[#212121] gp-text-[12px] gp-leading-3 ",children:i("No compare price")})})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Text.default,{...j}),r]}),core.filterToolbarPreview(r,!0)]})};exports.default=ProductPrice;
