import{b3 as z,a2 as F,b4 as M,b5 as h,b6 as A,j as l,b7 as E,aw as I,ax as O,b8 as T,V as G,b9 as D,ba as S,ay as H,aA as J}from"./index-DTC0Ed21.js";import{g as w}from"./get-base-value-JqT_q0U7.js";const[b,W]=z("Grid component was not found in tree"),N=(s,t)=>s==="content"?"auto":s==="auto"?"0rem":s?`${100/(t/s)}%`:void 0,P=(s,t,n)=>n||s==="auto"?"100%":s==="content"?"unset":N(s,t),q=(s,t)=>{if(s)return s==="auto"||t?"1":"auto"},R=(s,t)=>s===0?"0":s?`${100/(t/s)}%`:void 0;function K({span:s,order:t,offset:n,selector:a}){var x;const v=F(),e=W(),d=e.breakpoints||v.breakpoints,u=w(s)===void 0?12:w(s),m=M({"--col-order":(x=w(t))==null?void 0:x.toString(),"--col-flex-grow":q(u,e.grow),"--col-flex-basis":N(u,e.columns),"--col-width":u==="content"?"auto":void 0,"--col-max-width":P(u,e.columns,e.grow),"--col-offset":R(w(n),e.columns)}),i=h(d).reduce((r,o)=>{var y;return r[o]||(r[o]={}),typeof t=="object"&&t[o]!==void 0&&(r[o]["--col-order"]=(y=t[o])==null?void 0:y.toString()),typeof s=="object"&&s[o]!==void 0&&(r[o]["--col-flex-grow"]=q(s[o],e.grow),r[o]["--col-flex-basis"]=N(s[o],e.columns),r[o]["--col-width"]=s[o]==="content"?"auto":void 0,r[o]["--col-max-width"]=P(s[o],e.columns,e.grow)),typeof n=="object"&&n[o]!==void 0&&(r[o]["--col-offset"]=R(n[o],e.columns)),r},{}),j=A(h(i),d).filter(r=>h(i[r.value]).length>0).map(r=>({query:e.type==="container"?`mantine-grid (min-width: ${d[r.value]})`:`(min-width: ${d[r.value]})`,styles:i[r.value]}));return l.jsx(E,{styles:m,media:e.type==="container"?void 0:j,container:e.type==="container"?j:void 0,selector:a})}var $={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const L={span:12},B=I((s,t)=>{const n=O("GridCol",L,s),{classNames:a,className:v,style:e,styles:d,vars:f,span:u,order:m,offset:i,...c}=n,j=W(),x=T();return l.jsxs(l.Fragment,{children:[l.jsx(K,{selector:`.${x}`,span:u,order:m,offset:i}),l.jsx(G,{ref:t,...j.getStyles("col",{className:D(v,x),style:e,classNames:a,styles:d}),...c})]})});B.classes=$;B.displayName="@mantine/core/GridCol";function p({gutter:s,selector:t,breakpoints:n,type:a}){const v=F(),e=n||v.breakpoints,d=M({"--grid-gutter":S(w(s))}),f=h(e).reduce((i,c)=>(i[c]||(i[c]={}),typeof s=="object"&&s[c]!==void 0&&(i[c]["--grid-gutter"]=S(s[c])),i),{}),m=A(h(f),e).filter(i=>h(f[i.value]).length>0).map(i=>({query:a==="container"?`mantine-grid (min-width: ${e[i.value]})`:`(min-width: ${e[i.value]})`,styles:f[i.value]}));return l.jsx(E,{styles:d,media:a==="container"?void 0:m,container:a==="container"?m:void 0,selector:t})}const Q={gutter:"md",grow:!1,columns:12},U=J((s,{justify:t,align:n,overflow:a})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":a}})),V=I((s,t)=>{const n=O("Grid",Q,s),{classNames:a,className:v,style:e,styles:d,unstyled:f,vars:u,grow:m,gutter:i,columns:c,align:j,justify:x,children:r,breakpoints:o,type:y,..._}=n,g=H({name:"Grid",classes:$,props:n,className:v,style:e,classNames:a,styles:d,unstyled:f,vars:u,varsResolver:U}),C=T();return y==="container"&&o?l.jsxs(b,{value:{getStyles:g,grow:m,columns:c||12,breakpoints:o,type:y},children:[l.jsx(p,{selector:`.${C}`,...n}),l.jsx("div",{...g("container"),children:l.jsx(G,{ref:t,...g("root",{className:C}),..._,children:l.jsx("div",{...g("inner"),children:r})})})]}):l.jsxs(b,{value:{getStyles:g,grow:m,columns:c||12,breakpoints:o,type:y},children:[l.jsx(p,{selector:`.${C}`,...n}),l.jsx(G,{ref:t,...g("root",{className:C}),..._,children:l.jsx("div",{...g("inner"),children:r})})]})});V.classes=$;V.displayName="@mantine/core/Grid";V.Col=B;export{V as G};
