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