function e({items:e,activeItem:t,containerWidth:i,overflowWidth:l}){const s=[],h=[],o=e.length,n=e.reduce((e,t)=>e+t.width,0);if(n<=i||i<=0)return{visibleItems:e,overflowItems:h};let r=l;t&&(r+=t.width);let u=!1;for(let l=0;l<o;l++){const o=e[l];if(t.value===o.value)u=0===h.length,u&&s.push(t);else{o.width+r<=i&&0===h.length?(r+=o.width,s.push(o)):h.push(o)}}return u||s.push(t),{visibleItems:s,overflowItems:h}}export{e as calculateOverflow};
