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