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