import{isPlainObject as r}from"./utils/validateTypes.mjs";function l(l,n){if(null==l)return null;if(!Array.isArray(l))return[l];const[t,a]=l;return l.length>0&&null==t?null:n&&!n.primaryOptionArray||1===l.length&&Array.isArray(t)||2===l.length&&!r(t)&&r(a)?l:[l]}export{l as default};