"use strict";const A=require("./jsx-runtime-nZSsnGb7.cjs"),V=require("@synnaxlabs/x"),j=require("zod"),e=require("./css-CloSmhZB.cjs"),w=require("react"),a=({el:r,children:t,...u})=>w.createElement(r,u,t),z=Object.freeze(Object.defineProperty({__proto__:null,Element:a},Symbol.toStringTag,{value:"Module"})),C=["start","center","end","stretch"],D=j.enum(C),_=["start","center","end","between","around","evenly"],F=j.enum(_),N=(r,t)=>t??(r==="right"||r==="bottom"),p=(r,t,u,S)=>{if(t===!0)return"x";if(u===!0)return"y";if(r!=null)return V.direction.construct(r);if(S==!0)return"x"},L=r=>r==null||r===!1?!1:r===!0?e.CSS.M("full"):e.CSS.M("full",r),g=({style:r,align:t,className:u,grow:S,shrink:f,gap:s,color:o,justify:M,reverse:q,empty:v,pack:m,wrap:E,center:T,direction:b,rounded:c,sharp:y,borderWidth:B,borderColor:l,full:G,background:i,bordered:I,x:O,y:R,size:x,square:$=!1,...h})=>{const d=p(b,O,R,m),n=[u,e.CSS.B("flex"),d!=null&&e.CSS.M("direction",d),N(b,q)&&e.CSS.M("reverse"),L(G),m&&e.CSS.M("pack"),M!=null&&e.CSS.M("justify",M),t!=null&&e.CSS.M("align",t),E===!0&&e.CSS.M("wrap"),v===!0&&e.CSS.M("empty"),T===!0&&e.CSS.M("center"),I===!0&&e.CSS.M("bordered"),y===!0&&e.CSS.M("sharp"),x!=null&&e.CSS.M("height",x),$===!0&&e.CSS.M("square")];return r={borderWidth:B,...r},typeof o=="number"?n.push(e.CSS.M("color",o.toString())):o!=null&&o!==!1&&(r.color=e.CSS.colorVar(o)),typeof i=="number"?n.push(e.CSS.M("bg",i.toString())):i!=null&&i!==!1&&(r.backgroundColor=e.CSS.colorVar(i)),typeof l=="number"?n.push(e.CSS.M("border-color",l.toString())):l!=null&&(r.borderColor=e.CSS.colorVar(l)),c===!0?n.push(e.CSS.M("rounded")):typeof c=="number"&&(r.borderRadius=`${c}rem`),typeof s=="number"?r.gap=`${s}rem`:s!=null&&n.push(e.CSS.M("gap",s)),typeof S=="number"?r.flexGrow=S:S===!0&&n.push(e.CSS.M("grow")),typeof f=="number"?r.flexShrink=f:f===!0&&n.push(e.CSS.M("shrink")),A.jsxRuntimeExports.jsx(a,{className:e.CSS(...n),style:r,...h,el:h.el??"div"})},P=Object.freeze(Object.defineProperty({__proto__:null,ALIGNMENTS:C,Box:g,JUSTIFICATIONS:_,alignmentZ:D,justificationZ:F,parseDirection:p,shouldReverse:N},Symbol.toStringTag,{value:"Module"}));exports.ALIGNMENTS=C;exports.Box=P;exports.Box$1=g;exports.Element=a;exports.Generic=z;exports.parseDirection=p;
