import{L as V,h as T,M as v,N as u,O as b,F as D,P as F,j as M,g as B,w as E,Q as k,f as N,u as O}from"./CircularProgress-1.0.74-QfwfRJ7i.js";import{r as p}from"./redux-1.0.74-D8bIc6ki.js";import{j as G}from"./tanstack-1.0.74-aU0azVkW.js";import{e as U}from"./Typography-1.0.74-B4mhsevh.js";import{a as $}from"./useThemeProps-1.0.74-eOKEtzB-.js";const A=V(),L=E(),I=A("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,s)=>s.root});function Q(e){return $({props:e,name:"MuiStack",defaultTheme:L})}function q(e,s){const n=p.Children.toArray(e).filter(Boolean);return n.reduce((a,c,t)=>(a.push(c),t<n.length-1&&a.push(p.cloneElement(s,{key:`separator-${t}`})),a),[])}const z=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],H=({ownerState:e,theme:s})=>{let n={display:"flex",flexDirection:"column",...v({theme:s},u({values:e.direction,breakpoints:s.breakpoints.values}),a=>({flexDirection:a}))};if(e.spacing){const a=b(s),c=Object.keys(s.breakpoints.values).reduce((o,r)=>((typeof e.spacing=="object"&&e.spacing[r]!=null||typeof e.direction=="object"&&e.direction[r]!=null)&&(o[r]=!0),o),{}),t=u({values:e.direction,base:c}),m=u({values:e.spacing,base:c});typeof t=="object"&&Object.keys(t).forEach((o,r,i)=>{if(!t[o]){const l=r>0?t[i[r-1]]:"column";t[o]=l}}),n=D(n,v({theme:s},m,(o,r)=>e.useFlexGap?{gap:k(a,o)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${z(r?t[r]:e.direction)}`]:k(a,o)}}))}return n=F(s.breakpoints,n),n};function J(e={}){const{createStyledComponent:s=I,useThemeProps:n=Q,componentName:a="MuiStack"}=e,c=()=>M({root:["root"]},o=>B(a,o),{}),t=s(H);return p.forwardRef(function(o,r){const i=n(o),f=U(i),{component:l="div",direction:h="column",spacing:x=0,divider:y,children:g,className:j,useFlexGap:P=!1,...S}=f,C={direction:h,spacing:x,useFlexGap:P},R=c();return G.jsx(t,{as:l,ownerState:C,ref:r,className:T(R.root,j),...S,children:y?q(g,y):g})})}const _=J({createStyledComponent:N("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,s)=>s.root}),useThemeProps:e=>O({props:e,name:"MuiStack"})});export{_ as S};
