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