import r from"../node_modules/classnames/index.js";import e from"../node_modules/lodash/isNil.js";import t from"../node_modules/lodash/isNumber.js";const n=r=>r.filter((r=>!e(r))),a=r=>e(r["aria-label"])?e(r.children)||"string"!=typeof r.children?void 0:r.children:r["aria-label"],o=(r,e)=>{if(e)switch(r){case"margin":return`m-${e}`;case"marginBottom":return`mb-${e}`;case"marginLeft":return`ms-${e}`;case"marginRight":return`me-${e}`;case"marginTop":return`mt-${e}`;case"marginY":return`my-${e}`;case"marginX":return`mx-${e}`;case"padding":return`p-${e}`;case"paddingBottom":return`pb-${e}`;case"paddingLeft":return`ps-${e}`;case"paddingRight":return`pe-${e}`;case"paddingTop":return`pt-${e}`;case"paddingX":return`px-${e}`;case"paddingY":return`py-${e}`}},i=["margin","marginBottom","marginLeft","marginRight","marginTop","marginX","marginY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","paddingX","paddingY"],s=e=>r(n(i.map((r=>{if(e.hasOwnProperty(r))return o(r,e[r])})))),d=(r,e)=>{if(e)switch(r){case"alignItems":return`align-items-${e}`;case"direction":return`flex-${e}`;case"wrap":return"flex-wrap";case"flex":return t(e)?`d-flex flex-${e}`:"d-flex";case"justifyContent":return`justify-content-${e}`}},l=(r,e)=>{if(e||0===e)switch(r){case"alignSelf":return`align-self-${e.replace("flex-","")}`;case"flexGrow":return`flex-grow-${e}`;case"flexShrink":return`flex-shrink-${e}`}},c=["alignItems","direction","flex","justifyContent","wrap"],u=e=>r(n(c.map((r=>{if(e.hasOwnProperty(r))return d(r,e[r])})))),f=["alignSelf","flexGrow","flexShrink"],p=e=>r(n(f.map((r=>{if(e.hasOwnProperty(r))return l(r,e[r])})))),g=(r,e)=>{if(e)switch(r){case"overflow":return`overflow-${e}`;case"overflowX":return`overflow-x-${e}`;case"overflowY":return`overflow-y-${e}`}},m=["overflow","overflowY","overflowX"],b=e=>r(n(m.map((r=>{if(e.hasOwnProperty(r))return g(r,e[r])})))),$=(r,e)=>1===e?r:`${r}-${e}`,h=["border","borderBottom","borderColor","borderLeft","borderRight","borderRadius","borderTop","borderX","borderY","rounded"],w=e=>r(n(h.map((r=>{if(e.hasOwnProperty(r))return((r,e)=>{if(!e)return;const t=e;switch(r){case"border":return $("border",t);case"borderBottom":return $("border-bottom",t);case"borderColor":return`border-${e}`;case"borderLeft":return $("border-left",t);case"borderRadius":return`border-radius-${e}`;case"borderRight":return $("border-right",t);case"borderTop":return $("border-top",t);case"borderX":return`${$("border-left",t)} ${$("border-right",t)}`;case"borderY":return`${$("border-top",t)} ${$("border-bottom",t)}`}})(r,e[r])})))),x=r=>{if(r)return`text-${r}`},y=(r=2)=>{switch(r){case 1:return"display-1";case 2:return"display-2";case 3:return"display-3"}},v=r=>{switch(r){case"sm":return 3;case"md":return 2;case"lg":return 1}},R=(r,e)=>{if(e)switch(r){case"align":return`text-${e}`;case"legacyColor":return x(e);case"lineClamp":return`line-clamp-${e}`;case"light":return"text-gray-dark";case"size":return y(e)}},C=["align","light","legacyColor","lineClamp","size"],L=e=>r(n(C.map((r=>{if(e.hasOwnProperty(r))return R(r,e[r])}))));var X;!function(r){r.Left="Left",r.Right="Right"}(X||(X={}));export{X as LabelPlacement,w as convertBorderPropsToClassNames,u as convertFlexContainerPropsToClassNames,p as convertFlexItemPropsToClassNames,b as convertOverflowPropsToClassNames,s as convertSpacingPropsToClassNames,L as convertTextStylePropsToClassNames,a as getAriaLabelFromProps,x as getColorClassFromColorProp,v as mapBootstrapSizeToTextSize,d as mapFlexContainerPropToBootstrapClass,l as mapFlexItemPropToBootstrapClass,g as mapOverflowPropToBootstrapClass,o as mapSpacingPropToBootstrapClass,R as mapTextPropToClass,y as mapTextSizePropToClass,m as overflowProps,i as spacingProps};
//# sourceMappingURL=utils.js.map
