import{aS as P,aC as w,aD as N,j as a,C,aT as F,aU as U,aV as z,aW as O,aX as y,aY as $,U as M,aZ as j,a_ as T,a$ as _,aB as A,b0 as D}from"./index-n-59FgrC.js";import{g}from"./get-base-value-JqT_q0U7.js";var q={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const B={withShadow:!0},E=F((s,{radius:o,size:t})=>({root:{"--cs-radius":o===void 0?void 0:z(o),"--cs-size":U(t)}})),G=P((s,o)=>{const t=w("ColorSwatch",B,s),{classNames:c,className:l,style:i,styles:m,unstyled:d,vars:p,color:u,size:r,radius:e,withShadow:n,children:S,variant:v,...f}=w("ColorSwatch",B,t),h=N({name:"ColorSwatch",props:t,classes:q,className:l,style:i,classNames:c,styles:m,unstyled:d,vars:p,varsResolver:E});return a.jsxs(C,{ref:o,variant:v,size:r,...h("root",{focusable:!0}),...f,children:[a.jsx("span",{...h("alphaOverlay")}),n&&a.jsx("span",{...h("shadowOverlay")}),a.jsx("span",{...h("colorOverlay",{style:{backgroundColor:u}})}),a.jsx("span",{...h("childrenOverlay"),children:S})]})});G.classes=q;G.displayName="@mantine/core/ColorSwatch";function I({spacing:s,verticalSpacing:o,cols:t,selector:c}){var r;const l=M(),i=o===void 0?s:o,m=O({"--sg-spacing-x":y(g(s)),"--sg-spacing-y":y(g(i)),"--sg-cols":(r=g(t))==null?void 0:r.toString()}),d=j(l.breakpoints).reduce((e,n)=>(e[n]||(e[n]={}),typeof s=="object"&&s[n]!==void 0&&(e[n]["--sg-spacing-x"]=y(s[n])),typeof i=="object"&&i[n]!==void 0&&(e[n]["--sg-spacing-y"]=y(i[n])),typeof t=="object"&&t[n]!==void 0&&(e[n]["--sg-cols"]=t[n]),e),{}),u=T(j(d),l.breakpoints).filter(e=>j(d[e.value]).length>0).map(e=>({query:`(min-width: ${l.breakpoints[e.value]})`,styles:d[e.value]}));return a.jsx($,{styles:m,media:u,selector:c})}function x(s){return typeof s=="object"&&s!==null?j(s):[]}function W(s){return s.sort((o,t)=>_(o)-_(t))}function X({spacing:s,verticalSpacing:o,cols:t}){const c=Array.from(new Set([...x(s),...x(o),...x(t)]));return W(c)}function Y({spacing:s,verticalSpacing:o,cols:t,selector:c}){var u;const l=o===void 0?s:o,i=O({"--sg-spacing-x":y(g(s)),"--sg-spacing-y":y(g(l)),"--sg-cols":(u=g(t))==null?void 0:u.toString()}),m=X({spacing:s,verticalSpacing:o,cols:t}),d=m.reduce((r,e)=>(r[e]||(r[e]={}),typeof s=="object"&&s[e]!==void 0&&(r[e]["--sg-spacing-x"]=y(s[e])),typeof l=="object"&&l[e]!==void 0&&(r[e]["--sg-spacing-y"]=y(l[e])),typeof t=="object"&&t[e]!==void 0&&(r[e]["--sg-cols"]=t[e]),r),{}),p=m.map(r=>({query:`simple-grid (min-width: ${r})`,styles:d[r]}));return a.jsx($,{styles:i,container:p,selector:c})}var R={container:"m_925c2d2c",root:"m_2415a157"};const Z={cols:1,spacing:"md",type:"media"},V=A((s,o)=>{const t=w("SimpleGrid",Z,s),{classNames:c,className:l,style:i,styles:m,unstyled:d,vars:p,cols:u,verticalSpacing:r,spacing:e,type:n,...S}=t,v=N({name:"SimpleGrid",classes:R,props:t,className:l,style:i,classNames:c,styles:m,unstyled:d,vars:p}),f=D();return n==="container"?a.jsxs(a.Fragment,{children:[a.jsx(Y,{...t,selector:`.${f}`}),a.jsx("div",{...v("container"),children:a.jsx(C,{ref:o,...v("root",{className:f}),...S})})]}):a.jsxs(a.Fragment,{children:[a.jsx(I,{...t,selector:`.${f}`}),a.jsx(C,{ref:o,...v("root",{className:f}),...S})]})});V.classes=R;V.displayName="@mantine/core/SimpleGrid";export{G as C,V as S};
