import{N as V,e as T,c as b,O as D,P as v,Q as u,R as B,J as F,S as M,l as E,h as N,U as k,j as O,i as U}from"./Typography-1.0.63-mecuj_Wl.js";import{r as p}from"./redux-1.0.63-Df-eBzJn.js";import{j as G}from"./cm-1.0.63-CSIRHMXC.js";import{a as $}from"./InputAdornment-1.0.63-q8tTbJxw.js";const A=V(),I=D(),J=A("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,s)=>s.root});function L(e){return $({props:e,name:"MuiStack",defaultTheme:I})}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 q=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],z=({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=F(n,v({theme:s},m,(o,r)=>e.useFlexGap?{gap:k(a,o)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${q(r?t[r]:e.direction)}`]:k(a,o)}}))}return n=M(s.breakpoints,n),n};function H(e={}){const{createStyledComponent:s=J,useThemeProps:n=L,componentName:a="MuiStack"}=e,c=()=>E({root:["root"]},o=>N(a,o),{}),t=s(z);return p.forwardRef(function(o,r){const i=n(o),f=T(i),{component:l="div",direction:h="column",spacing:x=0,divider:y,children:g,className:S,useFlexGap:j=!1,...P}=f,C={direction:h,spacing:x,useFlexGap:j},R=c();return G.jsx(t,{as:l,ownerState:C,ref:r,className:b(R.root,S),...P,children:y?Q(g,y):g})})}const Z=H({createStyledComponent:O("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,s)=>s.root}),useThemeProps:e=>U({props:e,name:"MuiStack"})});export{Z as S};
