import{findBestPlanFromList as e}from"./calculateBestSellingPlan.js";import{convertDecimalToNumber as t}from"@gem-sdk/core";let findDefaultValue=i=>{let{validPlans:l,extractedSettings:r,currentVariant:a,plans:f}=i;if(r.defaultOptions){let e=l.find(e=>e.baseID===r.defaultOptions),t=l.find(e=>e.id===r.defaultOptions),i=e?.baseID??t?.baseID;if(i)return i}if(l.length>0){let i="number"==typeof a?.price?String(a.price):a?.price??void 0,r=t(i)??0,f=e({plans:l,variantPrice:r});if(f)return f.baseID}return f[0]?.value};export{findDefaultValue};
