"use strict";var helpers=require("./helpers.js"),styles=require("./styles.js");const getBaseButtonData=({style:t,styles:e,setting:s})=>{let{iconSvg:l,iconAlign:a,shouldClearSpace:o,enableHoverEffect:n}=s??{};return{iconVisible:helpers.checkIconVisibility(e),buttonStyle:styles.getButtonStyle(t,e),buttonSettings:{iconSvg:l,iconAlign:a,iconVisible:helpers.checkIconVisibility(e),shouldClearSpace:o,enableHoverEffect:n}}},getSoldOutButtonData=t=>{let{buttonStyle:e,buttonSettings:s}=getBaseButtonData(t);return{buttonStyles:styles.getSoldOutButtonStyles(t.styles),buttonStyle:e,buttonSettings:{...s,htmlType:"button",label:t.label}}},getAddToCartButtonData=t=>{let e=styles.getAddToCartButtonStyles(t.styles),{buttonStyle:s,buttonSettings:l}=getBaseButtonData(t),a=e=>{let{isLiquid:s=!1}=e??{},a=s?{disabledLoading:!1,translate:t.setting?.translate?"label":void 0}:{loading:t.isLoading};return{...l,...a,htmlType:"submit",label:t.setting?.label}};return{buttonStyle:s,buttonStyles:e,getButtonSettings:a}};exports.getAddToCartButtonData=getAddToCartButtonData,exports.getSoldOutButtonData=getSoldOutButtonData;
