'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})=>{let c=()=>i({priceType:r.Regular,settings:e(s)}),n=()=>i({priceType:r.Compare,settings:t(s)}),u=()=>{if(!s?.priceLayout)return[c];switch(s?.priceLayout){case a.PRICE_ONLY:return[c];case a.PRICE_BEFORE:return[c,n];case a.PRICE_AFTER:return[n,c];default:return[c,n]}},m=u();return o({components:m,separator:s?.separator,showPrice:!!p?.enablePrice,showSeparator:!!p?.enableSeparator})};export{ProductButtonPrice as default};
