import e from"./format.js";import{modifierPhases as r}from"../enums.js";var n='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',o=["name","enabled","phase","fn","effect","requires","options"];function a(a){a.forEach((function(i){Object.keys(i).forEach((function(s){switch(s){case"name":"string"!=typeof i.name&&console.error(e(n,String(i.name),'"name"','"string"','"'+String(i.name)+'"'));break;case"enabled":"boolean"!=typeof i.enabled&&console.error(e(n,i.name,'"enabled"','"boolean"','"'+String(i.enabled)+'"'));case"phase":r.indexOf(i.phase)<0&&console.error(e(n,i.name,'"phase"',"either "+r.join(", "),'"'+String(i.phase)+'"'));break;case"fn":"function"!=typeof i.fn&&console.error(e(n,i.name,'"fn"','"function"','"'+String(i.fn)+'"'));break;case"effect":"function"!=typeof i.effect&&console.error(e(n,i.name,'"effect"','"function"','"'+String(i.fn)+'"'));break;case"requires":Array.isArray(i.requires)||console.error(e(n,i.name,'"requires"','"array"','"'+String(i.requires)+'"'));break;case"requiresIfExists":Array.isArray(i.requiresIfExists)||console.error(e(n,i.name,'"requiresIfExists"','"array"','"'+String(i.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+i.name+'" modifier, valid properties are '+o.map((function(e){return'"'+e+'"'})).join(", ")+'; but "'+s+'" was provided.')}i.requires&&i.requires.forEach((function(r){null==a.find((function(e){return e.name===r}))&&console.error(e('Popper: modifier "%s" requires "%s", but "%s" modifier is not available',String(i.name),r,r))}))}))}))}export default a;
//# sourceMappingURL=validateModifiers.js.map
