import{O as h,V as f,B as $,D as j,ax as o,ay as I,aT as g,a2 as _,E as G,d as O,dl as E,N as F,H as T,f as A,R as D,Q as N}from"./outputWidgets.3c3deba7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="35050e51-51d8-46aa-8b5c-2bb1183a5a30",e._sentryDebugIdIdentifier="sentry-dbid-35050e51-51d8-46aa-8b5c-2bb1183a5a30")}catch{}})();const d=["wrap","nowrap","wrap-reverse"],y=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],x=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],P=(e,t)=>{const a={};return d.forEach(n=>{a[`${e}-wrap-${n}`]=t.wrap===n}),a},V=(e,t)=>{const a={};return x.forEach(n=>{a[`${e}-align-${n}`]=t.align===n}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a},W=(e,t)=>{const a={};return y.forEach(n=>{a[`${e}-justify-${n}`]=t.justify===n}),a};function L(e,t){return h(f(f(f({},P(e,t)),V(e,t)),W(e,t)))}const H=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},J=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},M=e=>{const{componentCls:t}=e,a={};return d.forEach(n=>{a[`${t}-wrap-${n}`]={flexWrap:n}}),a},R=e=>{const{componentCls:t}=e,a={};return x.forEach(n=>{a[`${t}-align-${n}`]={alignItems:n}}),a},z=e=>{const{componentCls:t}=e,a={};return y.forEach(n=>{a[`${t}-justify-${n}`]={justifyContent:n}}),a},B=$("Flex",e=>{const t=j(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[H(t),J(t),M(t),R(t),z(t)]});function p(e){return["small","middle","large"].includes(e)}const Q=()=>({prefixCls:o(),vertical:I(),wrap:o(),justify:o(),align:o(),flex:g([Number,String]),gap:g([Number,String]),component:_()});var X=globalThis&&globalThis.__rest||function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(a[n[l]]=e[n[l]]);return a};const q=O({name:"AFlex",inheritAttrs:!1,props:Q(),setup(e,t){let{slots:a,attrs:n}=t;const{flex:l,direction:m}=E(),{prefixCls:s}=F("flex",e),[b,v]=B(s),S=T(()=>{var r;return[s.value,v.value,L(s.value,e),{[`${s.value}-rtl`]:m.value==="rtl",[`${s.value}-gap-${e.gap}`]:p(e.gap),[`${s.value}-vertical`]:(r=e.vertical)!==null&&r!==void 0?r:l==null?void 0:l.value.vertical}]});return()=>{var r;const{flex:u,gap:c,component:w="div"}=e,C=X(e,["flex","gap","component"]),i={};return u&&(i.flex=u),c&&!p(c)&&(i.gap=`${c}px`),b(A(w,D({class:[n.class,S.value],style:[n.style,i]},N(C,["justify","wrap","align","vertical"])),{default:()=>[(r=a.default)===null||r===void 0?void 0:r.call(a)]}))}}}),Y=G(q);export{Y as A};
//# sourceMappingURL=index.c3c37865.js.map
