import{d as S,aR as Y,d2 as al,cT as j,a_ as B,z as W,b9 as N,cw as rl,aY as R,aZ as nl,a as s,o as a,c as b,g as v,F as h,v as E,x as z,f as F,a$ as O,cs as il,cf as ol,bc as cl,bd as pl,Y as dl,T as w,aC as Z,y as q,t as G,a0 as ul,d3 as yl,b0 as bl,b3 as ml,__tla as vl}from"./index-8dc1e40a.js";let P,H,hl=Promise.all([(()=>{try{return vl}catch{}})()]).then(async()=>{const A=Symbol("elDescriptions");var k=S({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup:()=>({descriptions:Y(A,{})}),render(){var _,o,e,$,r,c,x;const i=al(this.cell),l=(((_=this.cell)==null?void 0:_.dirs)||[]).map(X=>{const{dir:ll,arg:el,modifiers:tl,value:sl}=X;return[ll,sl,el,tl]}),{border:d,direction:n}=this.descriptions,t=n==="vertical",g=(($=(e=(o=this.cell)==null?void 0:o.children)==null?void 0:e.label)==null?void 0:$.call(e))||i.label,u=(x=(c=(r=this.cell)==null?void 0:r.children)==null?void 0:c.default)==null?void 0:x.call(c),y=i.span,f=i.align?`is-${i.align}`:"",m=i.labelAlign?`is-${i.labelAlign}`:f,D=i.className,T=i.labelClassName,I={width:j(i.width),minWidth:j(i.minWidth)},p=B("descriptions");switch(this.type){case"label":return W(N(this.tag,{style:I,class:[p.e("cell"),p.e("label"),p.is("bordered-label",d),p.is("vertical-label",t),m,T],colSpan:t?y:1},g),l);case"content":return W(N(this.tag,{style:I,class:[p.e("cell"),p.e("content"),p.is("bordered-content",d),p.is("vertical-content",t),f,D],colSpan:t?y:2*y-1},u),l);default:return W(N("td",{style:I,class:[p.e("cell"),f],colSpan:y},[rl(g)?void 0:N("span",{class:[p.e("label"),T]},g),N("span",{class:[p.e("content"),D]},u)]),l)}}});const J=R({row:{type:nl(Array),default:()=>[]}}),K={key:1},L=S({name:"ElDescriptionsRow"});var M=O(S({...L,props:J,setup(_){const o=Y(A,{});return(e,$)=>s(o).direction==="vertical"?(a(),b(h,{key:0},[v("tr",null,[(a(!0),b(h,null,E(e.row,(r,c)=>(a(),z(s(k),{key:`tr1-${c}`,cell:r,tag:"th",type:"label"},null,8,["cell"]))),128))]),v("tr",null,[(a(!0),b(h,null,E(e.row,(r,c)=>(a(),z(s(k),{key:`tr2-${c}`,cell:r,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(a(),b("tr",K,[(a(!0),b(h,null,E(e.row,(r,c)=>(a(),b(h,{key:`tr3-${c}`},[s(o).border?(a(),b(h,{key:0},[F(s(k),{cell:r,tag:"td",type:"label"},null,8,["cell"]),F(s(k),{cell:r,tag:"td",type:"content"},null,8,["cell"])],64)):(a(),z(s(k),{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 Q=R({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:""}}),U=S({name:"ElDescriptions"});var V=O(S({...U,props:Q,setup(_){const o=_,e=B("descriptions"),$=ol(),r=cl();pl(A,o);const c=dl(()=>[e.b(),e.m($.value)]),x=(l,d,n,t=!1)=>(l.props||(l.props={}),d>n&&(l.props.span=n),t&&(l.props.span=d),l),i=()=>{if(!r.default)return[];const l=yl(r.default()).filter(u=>{var y;return((y=u==null?void 0:u.type)==null?void 0:y.name)==="ElDescriptionsItem"}),d=[];let n=[],t=o.column,g=0;return l.forEach((u,y)=>{var f;const m=((f=u.props)==null?void 0:f.span)||1;if(y<l.length-1&&(g+=m>t?t:m),y===l.length-1){const D=o.column-g%o.column;return n.push(x(u,D,t,!0)),void d.push(n)}m<t?(t-=m,n.push(u)):(n.push(x(u,m,t)),d.push(n),t=o.column,n=[])}),d};return(l,d)=>(a(),b("div",{class:w(s(c))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(a(),b("div",{key:0,class:w(s(e).e("header"))},[v("div",{class:w(s(e).e("title"))},[Z(l.$slots,"title",{},()=>[q(G(l.title),1)])],2),v("div",{class:w(s(e).e("extra"))},[Z(l.$slots,"extra",{},()=>[q(G(l.extra),1)])],2)],2)):ul("v-if",!0),v("div",{class:w(s(e).e("body"))},[v("table",{class:w([s(e).e("table"),s(e).is("bordered",l.border)])},[v("tbody",null,[(a(!0),b(h,null,E(i(),(n,t)=>(a(),z(M,{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 C;C=S({name:"ElDescriptionsItem",props:R({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:""}})}),H=bl(V,{DescriptionsItem:C}),P=ml(C)});export{P as E,hl as __tla,H as a};
