import{C as c,A as g}from"./CollapsePanel.281afb4a.js";import{N as j,U as u,z as I,B as G,aF as o,aG as _,bh as d,a1 as F,D as O,d as A,di as E,L as P,G as D,f as T,Q as N,O as L}from"./outputWidgets.723dbd35.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]="69ef4a02-e932-42f2-8bc1-74bf476e0e4a",e._sentryDebugIdIdentifier="sentry-dbid-69ef4a02-e932-42f2-8bc1-74bf476e0e4a")}catch{}})();c.Panel=g;c.install=function(e){return e.component(c.name,c),e.component(g.name,g),e};const m=["wrap","nowrap","wrap-reverse"],x=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],v=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],V=(e,t)=>{const a={};return m.forEach(n=>{a[`${e}-wrap-${n}`]=t.wrap===n}),a},W=(e,t)=>{const a={};return v.forEach(n=>{a[`${e}-align-${n}`]=t.align===n}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a},z=(e,t)=>{const a={};return x.forEach(n=>{a[`${e}-justify-${n}`]=t.justify===n}),a};function J(e,t){return j(u(u(u({},V(e,t)),W(e,t)),z(e,t)))}const M=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},B=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},H=e=>{const{componentCls:t}=e,a={};return m.forEach(n=>{a[`${t}-wrap-${n}`]={flexWrap:n}}),a},Q=e=>{const{componentCls:t}=e,a={};return v.forEach(n=>{a[`${t}-align-${n}`]={alignItems:n}}),a},R=e=>{const{componentCls:t}=e,a={};return x.forEach(n=>{a[`${t}-justify-${n}`]={justifyContent:n}}),a},U=I("Flex",e=>{const t=G(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[M(t),B(t),H(t),Q(t),R(t)]});function y(e){return["small","middle","large"].includes(e)}const X=()=>({prefixCls:o(),vertical:_(),wrap:o(),justify:o(),align:o(),flex:d([Number,String]),gap:d([Number,String]),component:F()});var q=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 Y=A({name:"AFlex",inheritAttrs:!1,props:X(),setup(e,t){let{slots:a,attrs:n}=t;const{flex:l,direction:b}=E(),{prefixCls:r}=P("flex",e),[C,S]=U(r),h=D(()=>{var s;return[r.value,S.value,J(r.value,e),{[`${r.value}-rtl`]:b.value==="rtl",[`${r.value}-gap-${e.gap}`]:y(e.gap),[`${r.value}-vertical`]:(s=e.vertical)!==null&&s!==void 0?s:l==null?void 0:l.value.vertical}]});return()=>{var s;const{flex:p,gap:i,component:w="div"}=e,$=q(e,["flex","gap","component"]),f={};return p&&(f.flex=p),i&&!y(i)&&(f.gap=`${i}px`),C(T(w,N({class:[n.class,h.value],style:[n.style,f]},L($,["justify","wrap","align","vertical"])),{default:()=>[(s=a.default)===null||s===void 0?void 0:s.call(a)]}))}}}),K=O(Y);export{K as A};
//# sourceMappingURL=index.f5a05254.js.map
