import{d as S,aU as R,c3 as al,c0 as U,aF as j,y as W,bU as D,c4 as rl,aD as F,aE as nl,a as s,o as a,c as m,h,F as v,v as N,x as A,g as q,aH as B,c5 as il,bM as ol,b2 as cl,as as pl,L as ul,a0 as w,aG as G,q as H,t as L,R as dl,c6 as yl,aI as ml,aM as bl,__tla as hl}from"./index-7d5b26d3.js";let O,P,vl=Promise.all([(()=>{try{return hl}catch{}})()]).then(async()=>{const I=Symbol("elDescriptions");var k=S({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup:()=>({descriptions:R(I,{})}),render(){var _,o,e,$,r,c,x;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=(($=(e=(o=this.cell)==null?void 0:o.children)==null?void 0:e.label)==null?void 0:$.call(e))||i.label,d=(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}`:"",b=i.labelAlign?`is-${i.labelAlign}`:f,E=i.className,M=i.labelClassName,C={width:U(i.width),minWidth:U(i.minWidth)},p=j("descriptions");switch(this.type){case"label":return W(D(this.tag,{style:C,class:[p.e("cell"),p.e("label"),p.is("bordered-label",u),p.is("vertical-label",t),b,M],colSpan:t?y:1},g),l);case"content":return W(D(this.tag,{style:C,class:[p.e("cell"),p.e("content"),p.is("bordered-content",u),p.is("vertical-content",t),f,E],colSpan:t?y:2*y-1},d),l);default:return W(D("td",{style:C,class:[p.e("cell"),f],colSpan:y},[rl(g)?void 0:D("span",{class:[p.e("label"),M]},g),D("span",{class:[p.e("content"),E]},d)]),l)}}});const J=F({row:{type:nl(Array),default:()=>[]}}),K={key:1},Q=S({name:"ElDescriptionsRow"});var T=B(S({...Q,props:J,setup(_){const o=R(I,{});return(e,$)=>s(o).direction==="vertical"?(a(),m(v,{key:0},[h("tr",null,[(a(!0),m(v,null,N(e.row,(r,c)=>(a(),A(s(k),{key:`tr1-${c}`,cell:r,tag:"th",type:"label"},null,8,["cell"]))),128))]),h("tr",null,[(a(!0),m(v,null,N(e.row,(r,c)=>(a(),A(s(k),{key:`tr2-${c}`,cell:r,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(a(),m("tr",K,[(a(!0),m(v,null,N(e.row,(r,c)=>(a(),m(v,{key:`tr3-${c}`},[s(o).border?(a(),m(v,{key:0},[q(s(k),{cell:r,tag:"td",type:"label"},null,8,["cell"]),q(s(k),{cell:r,tag:"td",type:"content"},null,8,["cell"])],64)):(a(),A(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 V=F({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:""}}),X=S({name:"ElDescriptions"});var Y=B(S({...X,props:V,setup(_){const o=_,e=j("descriptions"),$=ol(),r=cl();pl(I,o);const c=ul(()=>[e.b(),e.m($.value)]),x=(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 b=((f=d.props)==null?void 0:f.span)||1;if(y<l.length-1&&(g+=b>t?t:b),y===l.length-1){const E=o.column-g%o.column;return n.push(x(d,E,t,!0)),void u.push(n)}b<t?(t-=b,n.push(d)):(n.push(x(d,b,t)),u.push(n),t=o.column,n=[])}),u};return(l,u)=>(a(),m("div",{class:w(s(c))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(a(),m("div",{key:0,class:w(s(e).e("header"))},[h("div",{class:w(s(e).e("title"))},[G(l.$slots,"title",{},()=>[H(L(l.title),1)])],2),h("div",{class:w(s(e).e("extra"))},[G(l.$slots,"extra",{},()=>[H(L(l.extra),1)])],2)],2)):dl("v-if",!0),h("div",{class:w(s(e).e("body"))},[h("table",{class:w([s(e).e("table"),s(e).is("bordered",l.border)])},[h("tbody",null,[(a(!0),m(v,null,N(i(),(n,t)=>(a(),A(T,{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:F({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:""}})}),P=ml(Y,{DescriptionsItem:z}),O=bl(z)});export{O as E,vl as __tla,P as a};
