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