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