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