'use client';
import{jsx as e,Fragment as r}from"react/jsx-runtime";import{useCartLine as t,useFormatMoney as i,cls as p}from"@gem-sdk/core";import c from"../../text/components/Text.js";import{useMemo as o}from"react";let CartLinePrice=({setting:a,styles:m,builderProps:n})=>{let l=t(),s=l.variant?.price??0,u=l.variant?.price??0,x=o(()=>a?.priceType==="compare"?u:s>0?s:u,[s,a?.priceType,u]),d=i(x,!1);return(a?.priceType!=="compare"||s)&&x?e(r,{children:e(c,{styles:m,setting:{text:d,excludeFlex:!0},builderProps:n,className:p({"gp-line-through":a?.priceType==="compare"})})}):null};export{CartLinePrice as default};
