'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(),i="edit"===t,{elementRef:c,moneyFormatted:u,currentProductId:a,isNoComparePrice:m,isNoComparePriceILP:o,emitNoDataSignal:l}=useGpPrice.useGpPrice(e),n=system.createClass(classes.getWrapperClasses(e)),x=system.createAttr(attrs.getAttrs(e,a)),p=helpers.getTextProps(e,u),d={visibility:"hidden",opacity:0,maxWidth:0,maxHeight:0},j=o?d:s;return jsxRuntime.jsxs("div",{ref:c,...x,className:n,style:j,"aria-hidden":"true",onClick:l,children:[m&&i?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:"No compare price"})})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Text.default,{...p}),r]}),core.filterToolbarPreview(r,!0)]})};exports.default=ProductPrice;
