import{template as r,dataStringify as e,isLocalEnv as o,baseAssetURL as s}from"@gem-sdk/core";import{getSettingPreloadData as c}from"../../../helpers.js";import t from"../../../text/components/Text.liquid.js";import{createClass as p,createAttr as m,createStateOrContext as i,Liquid as l}from"@gem-sdk/system";import{getWrapperClasses as a}from"./common/classes.js";import{getAttrs as d}from"./common/attrs.js";import{getTextProps as u}from"./common/helpers.js";let ProductPrice=n=>{let{style:f,setting:y,builderProps:$,pageContext:h}=n,g=p(a(n)),P=m(d(n)),j=u(n),_=i({priceType:y?.priceType,uid:$?.uid,locale:"{{shop.locale}}",currency:"{{shop.currency}}",moneyFormat:`{{ ${h?.showPriceCurrency?"shop.money_with_currency_format":"shop.money_format"} | replace: '"', '\\"' | escape }}`}),S=()=>{let r=o?"{{ 'gp-product-price-v7-5.js' | asset_url }}":`${s}/assets-v2/gp-product-price-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${c('class="gps-link" delay',"src")}="${r}" defer="defer"></script>`};return l(r`
      <gp-product-price
        ${P}
        class="${g}"
        style="${f}"
        gp-data='${e(_)}'
      >
        ${t(j)}
      </gp-product-price>
      ${S()}
  `)};export{ProductPrice,ProductPrice as default};
