import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{useState as e,useEffect as n}from"react";function i(i){var r=i.isMultiline,o=i.ref,l=i.selectedOptionsCount,a=i.tagClassName,s=i.tagWrapperClassName,c=e(-1),u=t(c,2),d=u[0],f=u[1];return n((function(){var t=-1;if(null!=o&&o.children&&!r)for(var e=o.getBoundingClientRect().bottom,n=0,i=0;o.children.length>i&&l>n;){var c=o.children[i];if(c.classList.contains(a)||c.classList.contains(s)){if(c.getBoundingClientRect().bottom>e){t=n;break}n++}i++}f(t)}),[o,r,l,a,f,s]),{overflowIndex:d,hiddenOptionsCount:d>-1?l-d:0}}export{i as useHiddenOptionsData};
