import{SEPARATOR as e}from"./constants.js";let checkIconVisibility=e=>e?.enableIcon===!0,getRenderRegularPriceSettings=e=>({lineThrough:!1,typo:removeColorFromTypo(e?.priceTypo)}),getRenderComparePriceSettings=e=>({lineThrough:!0,typo:removeColorFromTypo(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),getGPProductButtonState=(e,r)=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:r?.errorType,actionEffect:r?.actionEffect,enableMessage:r?.enableMessage,label:r?.label?.replaceAll("'","&#039;"),errorMessage:r?.errorMessage?.replaceAll("'","&#039;"),successMessage:r?.successMessage?.replaceAll("'","&#039;"),outOfStockLabel:r?.outOfStockLabel?.replaceAll("'","&#039;"),customURL:{link:r?.customURL?.link?.replaceAll("'","&#039;"),target:r?.customURL?.target}},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),renderSeparator=r=>{let t=r??"horizontal-line";return({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t]??e.HORIZONTAL_LINE},removeColorFromTypo=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{checkIconVisibility,getGPProductButtonState,getRenderComparePriceSettings,getRenderRegularPriceSettings,renderSeparator};
