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