import{defineProperty as e}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as i}from"react/jsx-runtime";import{forwardRef as a,useRef as r,useMemo as s}from"react";import t from"classnames";import o from"../../hooks/useMergeRefs.js";import l from"../Clickable/Clickable.js";import{FlexJustify as n,FlexAlign as c,FlexGap as p,FlexDirection as m}from"./FlexConstants.js";import{getStyle as d}from"../../helpers/typesciptCssModulesHelper.js";import f from"./Flex.module.scss.js";var u=a((function(a,n){var c=a.className,p=a.id,m=a.elementType,b=void 0===m?"div":m,j=a.direction,g=void 0===j?u.directions.ROW:j,y=a.wrap,v=void 0!==y&&y,x=a.children,C=a.justify,O=void 0===C?u.justify.START:C,k=a.align,N=void 0===k?u.align.CENTER:k,T=a.gap,h=void 0===T?u.gaps.NONE:T,R=a.onClick,E=a.style,L=a.ariaLabelledby,w=a.ariaLabel,F=a.tabIndex,H=r(null),I=o({refs:[n,H]}),M=s((function(){return Object.assign(Object.assign({},E),{gap:"".concat(h,"px")})}),[E,h]),P=s((function(){return R?{elementType:b,ariaLabelledby:L}:{"aria-labelledby":L}}),[R,b,L]);return i(R?l:b,Object.assign({id:p},P,{ref:I,className:t(f.container,d(f,"direction".concat(g)),d(f,"justify".concat(O)),d(f,"align".concat(N)),c,e({},f.wrap,v)),tabIndex:F,onClick:R,style:M,"aria-label":w},{children:x}))}));Object.assign(u,{justify:n,align:c,gaps:p,directions:m});var b=u;export{b as default};
