import{d as S,i as P,bz as al,bk as R,aM as j,k as W,b6 as $,bA as rl,aK as B,aL as nl,a as s,o as a,c as b,C as h,F as v,R as E,A,f as F,aO as G,bB as il,bC as ol,aX as cl,p as pl,e as ul,ac as k,aN as K,E as L,G as M,D as dl,bD as yl,aP as bl,aT as ml,__tla as hl}from"./index-92ad187a.js";let T,X,vl=Promise.all([(()=>{try{return hl}catch{}})()]).then(async()=>{const C=Symbol("elDescriptions");var w=S({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup:()=>({descriptions:P(C,{})}),render(){var _,o,e,D,r,c,N;const i=al(this.cell),l=(((_=this.cell)==null?void 0:_.dirs)||[]).map(Z=>{const{dir:ll,arg:el,modifiers:tl,value:sl}=Z;return[ll,sl,el,tl]}),{border:u,direction:n}=this.descriptions,t=n==="vertical",g=((D=(e=(o=this.cell)==null?void 0:o.children)==null?void 0:e.label)==null?void 0:D.call(e))||i.label,d=(N=(c=(r=this.cell)==null?void 0:r.children)==null?void 0:c.default)==null?void 0:N.call(c),y=i.span,f=i.align?`is-${i.align}`:"",m=i.labelAlign?`is-${i.labelAlign}`:f,x=i.className,O=i.labelClassName,I={width:R(i.width),minWidth:R(i.minWidth)},p=j("descriptions");switch(this.type){case"label":return W($(this.tag,{style:I,class:[p.e("cell"),p.e("label"),p.is("bordered-label",u),p.is("vertical-label",t),m,O],colSpan:t?y:1},g),l);case"content":return W($(this.tag,{style:I,class:[p.e("cell"),p.e("content"),p.is("bordered-content",u),p.is("vertical-content",t),f,x],colSpan:t?y:2*y-1},d),l);default:return W($("td",{style:I,class:[p.e("cell"),f],colSpan:y},[rl(g)?void 0:$("span",{class:[p.e("label"),O]},g),$("span",{class:[p.e("content"),x]},d)]),l)}}});const q=B({row:{type:nl(Array),default:()=>[]}}),H={key:1},J=S({name:"ElDescriptionsRow"});var Q=G(S({...J,props:q,setup(_){const o=P(C,{});return(e,D)=>s(o).direction==="vertical"?(a(),b(v,{key:0},[h("tr",null,[(a(!0),b(v,null,E(e.row,(r,c)=>(a(),A(s(w),{key:`tr1-${c}`,cell:r,tag:"th",type:"label"},null,8,["cell"]))),128))]),h("tr",null,[(a(!0),b(v,null,E(e.row,(r,c)=>(a(),A(s(w),{key:`tr2-${c}`,cell:r,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(a(),b("tr",H,[(a(!0),b(v,null,E(e.row,(r,c)=>(a(),b(v,{key:`tr3-${c}`},[s(o).border?(a(),b(v,{key:0},[F(s(w),{cell:r,tag:"td",type:"label"},null,8,["cell"]),F(s(w),{cell:r,tag:"td",type:"content"},null,8,["cell"])],64)):(a(),A(s(w),{key:1,cell:r,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]);const U=B({border:{type:Boolean,default:!1},column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:il,title:{type:String,default:""},extra:{type:String,default:""}}),V=S({name:"ElDescriptions"});var Y=G(S({...V,props:U,setup(_){const o=_,e=j("descriptions"),D=ol(),r=cl();pl(C,o);const c=ul(()=>[e.b(),e.m(D.value)]),N=(l,u,n,t=!1)=>(l.props||(l.props={}),u>n&&(l.props.span=n),t&&(l.props.span=u),l),i=()=>{if(!r.default)return[];const l=yl(r.default()).filter(d=>{var y;return((y=d==null?void 0:d.type)==null?void 0:y.name)==="ElDescriptionsItem"}),u=[];let n=[],t=o.column,g=0;return l.forEach((d,y)=>{var f;const m=((f=d.props)==null?void 0:f.span)||1;if(y<l.length-1&&(g+=m>t?t:m),y===l.length-1){const x=o.column-g%o.column;return n.push(N(d,x,t,!0)),void u.push(n)}m<t?(t-=m,n.push(d)):(n.push(N(d,m,t)),u.push(n),t=o.column,n=[])}),u};return(l,u)=>(a(),b("div",{class:k(s(c))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(a(),b("div",{key:0,class:k(s(e).e("header"))},[h("div",{class:k(s(e).e("title"))},[K(l.$slots,"title",{},()=>[L(M(l.title),1)])],2),h("div",{class:k(s(e).e("extra"))},[K(l.$slots,"extra",{},()=>[L(M(l.extra),1)])],2)],2)):dl("v-if",!0),h("div",{class:k(s(e).e("body"))},[h("table",{class:k([s(e).e("table"),s(e).is("bordered",l.border)])},[h("tbody",null,[(a(!0),b(v,null,E(i(),(n,t)=>(a(),A(Q,{key:t,row:n},null,8,["row"]))),128))])],2)],2)],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/description.vue"]]);let z;z=S({name:"ElDescriptionsItem",props:B({label:{type:String,default:""},span:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}})}),X=bl(Y,{DescriptionsItem:z}),T=ml(z)});export{T as E,vl as __tla,X as a};
