import i from"classnames";import{twMerge as c}from"tailwind-merge";var s=/\{[^}]+\}/g,T=(r,e)=>{if(!r)return"";if(typeof r=="string")return e?e.replaceAll(s,r):r;let{desktop:o,tablet:t,mobile:n}=r;return[o?`lg:${e?e.replace(s,o):o}`:"",t?`md:${e?e.replace(s,t):t}`:"",n?`${e?e.replace(s,n):n}`:""].filter(Boolean).join(" ")},y=["px","rem","em","vh","vw","%","auto"],f=/\d+(\/\d+)?(\.\d+)?/g,d=r=>r?"desktop"in r||"tablet"in r||"mobile"in r?[{},Object.keys(r).reduce((e,o)=>(Object.keys(r[o]||{}).forEach(t=>{let n=r?.[o]?.[t];typeof n<"u"&&(e[t]={...e[t],[o]:String(n)})}),e),{})]:Object.entries(r).reduce((e,[o,t])=>typeof t=="number"||y.includes(t.replace(f,""))||t==="auto"?[{...e[0],[o]:t},e[1]]:[e[0],{...e[1],[o]:t}],[{},{}]):[{},{}],g=(...r)=>c(i(r));export{T as a,d as b,g as c};
