import e from"../../node_modules/classnames/index.js";import r,{useMemo as t}from"react";import i from"../../node_modules/react-keyed-flatten-children/index.js";import{convertFlexContainerPropsToClassNames as o,convertFlexItemPropsToClassNames as n,convertOverflowPropsToClassNames as s,convertSpacingPropsToClassNames as d}from"../utils.js";import l from"./Stack.module.scss.js";const m=e=>{if(e)return l[`spacing${e}`]},c=c=>{const{children:a,component:u="div",customDivider:f,divider:p=!1,flex:h=!0,fullHeight:v,fullWidth:w,id:x,row:g=!1,spacing:j=2}=c,k=u,E=t((()=>{if(!p)return a;return i(a).flatMap(((e,t)=>{if(!t)return e;return[f||(g?r.createElement("div",{className:"border-right"}):r.createElement("hr",{key:`divider-${t}`,className:"w-100"})),e]}))}),[a,f,p,g]);return r.createElement(k,{className:e(o({...c,direction:g?"row":"column"}),n(c),s(c),d(c),m(j),{"d-flex":h,[l.row]:g,[l.column]:!g,"h-100":v,"w-100":w}),id:x},E)};export{c as default};
//# sourceMappingURL=Stack.js.map
