'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Text=require("../../text/components/Text.js"),React=require("react");const CartLinePrice=({setting:e,styles:r,builderProps:t})=>{let c=core.useCartLine(),i=c.variant?.price??0,s=c.variant?.price??0,a=React.useMemo(()=>e?.priceType==="compare"?s:i>0?i:s,[i,e?.priceType,s]),u=core.useFormatMoney(a,!1);return(e?.priceType!=="compare"||i)&&a?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Text.default,{styles:r,setting:{text:u,excludeFlex:!0},builderProps:t,className:core.cls({"gp-line-through":e?.priceType==="compare"})})}):null};exports.default=CartLinePrice;
