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