'use client';
import{PriceType as r}from"./types.js";import{getRenderRegularPriceSettings as e,getRenderComparePriceSettings as t}from"./common/helpers.js";import o from"./PriceLayout.liquid.js";import i from"./PriceComponent.liquid.js";import{PRICE_LAYOUT as a}from"./common/constants.js";let ProductButtonPrice=({setting:s,styles:p,pageContext:c})=>{let n=()=>i({priceType:r.Regular,settings:e(s),pageContext:c}),u=()=>i({priceType:r.Compare,settings:t(s),pageContext:c}),m=()=>{if(!s?.priceLayout)return[n];switch(s?.priceLayout){case a.PRICE_ONLY:return[n];case a.PRICE_BEFORE:return[n,u];case a.PRICE_AFTER:return[u,n];default:return[n,u]}},P=m();return o({components:P,separator:s?.separator,showPrice:!!p?.enablePrice,showSeparator:!!p?.enableSeparator})};export{ProductButtonPrice as default};
