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;").replaceAll('"',"&quot;")},o=e=>e?.enableIcon===!0,l=e=>({lineThrough:!1,typo:s(e?.priceTypo)}),i=e=>({lineThrough:!0,typo:s(e?.compareAtPriceTypo),opacityPrice:e?.opacityPrice}),c=({styles:e,setting:t,variantSelectionRequiredMessage:r})=>({styles:{errorTypo:e?.errorTypo,successTypo:e?.successTypo},setting:{errorType:t?.errorType,actionEffect:t?.actionEffect,enableMessage:t?.enableMessage,label:a(t?.label),outOfStockLabel:a(t?.outOfStockLabel),customURL:{link:a(t?.customURL?.link),target:t?.customURL?.target},variantSelectionRequiredMessage:a(r??t?.variantSelectionRequiredMessage)},variantID:"{{variant.id}}",disabled:"{{variant.available}}",totalVariant:"{{total_combinations}}"}),n=t=>({dot:e.DOT,"vertical-line":e.VERTICAL_LINE,"horizontal-line":e.HORIZONTAL_LINE})[t??"horizontal-line"]??e.HORIZONTAL_LINE,s=e=>(e?.attrs&&e?.attrs.color&&delete e.attrs.color,e);export{o as checkIconVisibility,a as escapeSingleQuoteForAttr,c as getGPProductButtonState,i as getRenderComparePriceSettings,l as getRenderRegularPriceSettings,n as renderSeparator};
