"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("@vueuse/core"),t=require("vue"),v={xs:0,sm:768,md:1280,lg:1728};function w(n){return Object.entries(n).sort((u,o)=>o[1]-u[1])}const R=(n,u)=>{const o=t.ref(0),c=t.computed(()=>{const{resize:e,resizeTarget:r}=n;return e?.target?e.target==="document"?document.documentElement:e.target==="form"?u.value?.$el:e.target:r??document.documentElement}),i=t.computed(()=>{const e=n.resize?.breakPoint??v;return w(e)});t.watch(()=>c.value,(e,r,m)=>{const s=typeof e=="string"?document.querySelector(e):e;if(!s)return;const{stop:d}=P.useResizeObserver(s,l=>{const f=l[0],{width:g}=f.contentRect;o.value=g});m(()=>{d()})},{flush:"post",immediate:!0});const a=t.computed(()=>{for(const[e,r]of i.value)if(t.unref(o)>r)return e;return"md"});return t.computed(()=>{const e=n.countPerRow,r={xs:e-2,sm:e-1,md:e,lg:e+1};return Math.max(1,r[a.value])})};exports.useCountPerRow=R;
