'use client';
import{jsxs as o,jsx as m}from"react/jsx-runtime";import{useProduct as s,useProductOfferDiscount as t}from"@gem-sdk/core";import r from"../../text/components/Text.js";import{useDynamicProduct as e}from"../hooks/useDynamicProduct.js";import{createClass as i,createAttr as c,createStyle as p}from"@gem-sdk/system";import{getContainerAttrs as d}from"../common/attrs.js";import{getContainerClasses as u}from"../common/classes.js";import{getContainerStyles as a}from"../common/styles.js";import{getTextSettings as n}from"../common/helpers.js";let f=({setting:f={},styles:l={},style:j,builderAttrs:y,builderProps:g,children:h})=>{let P=s(),x=P?.baseID?.replace("gid://shopify/Product/",""),k=t(),{isDynamicProduct:D,isEnableDynamicDiscount:T}=e(),{typo:b,direction:v,textAlign:I,align:N,width:q}=l,{message:w}=f,z=!!k||D&&T,A=i({...u({uid:g?.uid})}),B=c({...d({currentProductId:x,uid:g?.uid})}),C=p({...a({style:j,hasDiscount:z})}),E=n({hasDiscount:z,message:w});return o("div",{...B,className:A,style:C,children:[m(r,{setting:E,styles:{typo:b,direction:v,textAlign:I,align:N,width:q}}),h]})};export{f as default};
