import{SEPARATOR as e}from"./constants.js";let t=/^\s*\{\{[\s\S]*\}\}\s*$/,r=e=>e.replace(/\s*\}\}\s*$/,"| escape | replace: '&quot;', '\"' }}"),a=e=>{if(null==e)return e;let a=e.toString();return t.test(a)?r(a):a.replaceAll("'","&#39;").replaceAll("’","&#39;")},o=e=>e?.enableIcon===!0,s=e=>({lineThrough:!1,typo:n(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:n(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),l=({styles:e,setting:t,successMessage:r,errorMessage:o,variantSelectionRequiredMessage:s})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:a(t?.label),errorMessage:a(o??t?.errorMessage),successMessage:a(r??t?.successMessage),outOfStockLabel:a(t?.outOfStockLabel),customURL:{link:a(t?.customURL?.link),target:t?.customURL?.target},variantSelectionRequiredMessage:a(s??t?.variantSelectionRequiredMessage)},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),c=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,n=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{o as checkIconVisibility,l as getGPProductButtonState,i as getRenderComparePriceSettings,s as getRenderRegularPriceSettings,c as renderSeparator};
