'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("@gem-sdk/core"),u=require("../../text/components/Text.js");exports.default=({setting:c,styles:a,builderProps:s})=>{let{data:l}=t.useCartData(),i=r.useMemo(()=>{switch(c?.priceType){case"tax":default:return{value:l?.totalPrice,currency:l?.currency};case"duty":return{value:l?.lineItemsSubtotalPrice,currency:l?.currency};case"subtotal":return{value:l?.subtotalPrice,currency:l?.currency}}},[l?.currency,l?.lineItemsSubtotalPrice,l?.subtotalPrice,l?.totalPrice,c?.priceType]),n=t.useFormatMoney(i.value||0,!1);return i?e.jsx(u.default,{builderProps:s,styles:a,setting:{text:n,excludeFlex:!0}}):null};
