'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var types=require("./types.js"),helpers=require("./common/helpers.js"),PriceLayout_liquid=require("./PriceLayout.liquid.js"),PriceComponent_liquid=require("./PriceComponent.liquid.js"),constants=require("./common/constants.js");const ProductButtonPrice=({setting:e,styles:r,pageContext:t})=>{let i=()=>PriceComponent_liquid.default({priceType:types.PriceType.Regular,settings:helpers.getRenderRegularPriceSettings(e),pageContext:t}),s=()=>PriceComponent_liquid.default({priceType:types.PriceType.Compare,settings:helpers.getRenderComparePriceSettings(e),pageContext:t}),o=()=>{if(!e?.priceLayout)return[i];switch(e?.priceLayout){case constants.PRICE_LAYOUT.PRICE_ONLY:return[i];case constants.PRICE_LAYOUT.PRICE_BEFORE:return[i,s];case constants.PRICE_LAYOUT.PRICE_AFTER:return[s,i];default:return[i,s]}},n=o();return PriceLayout_liquid.default({components:n,separator:e?.separator,showPrice:!!r?.enablePrice,showSeparator:!!r?.enableSeparator})};exports.default=ProductButtonPrice;
