import{d as S,aP as J,bF as al,bG as K,aC as Q,x as F,aQ as D,bH as nl,aA as W,aB as rl,a as s,o as a,c as b,g as h,F as v,q as N,v as A,f as j,aE as q,bI as il,bJ as ol,aU as cl,aV as pl,K as ul,$ as w,aD as G,n as H,t as O,Q as dl,bK as yl,aF as bl,aJ as ml,__tla as hl}from"./index-04f8d540.js";let P,R,vl=Promise.all([(()=>{try{return hl}catch{}})()]).then(async()=>{const C=Symbol("elDescriptions");var k=S({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup:()=>({descriptions:J(C,{})}),render(){var _,o,e,$,n,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:r}=this.descriptions,t=r==="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=(n=this.cell)==null?void 0:n.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,E=i.className,B=i.labelClassName,z={width:K(i.width),minWidth:K(i.minWidth)},p=Q("descriptions");switch(this.type){case"label":return F(D(this.tag,{style:z,class:[p.e("cell"),p.e("label"),p.is("bordered-label",u),p.is("vertical-label",t),m,B],colSpan:t?y:1},g),l);case"content":return F(D(this.tag,{style:z,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 F(D("td",{style:z,class:[p.e("cell"),f],colSpan:y},[nl(g)?void 0:D("span",{class:[p.e("label"),B]},g),D("span",{class:[p.e("content"),E]},d)]),l)}}});const U=W({row:{type:rl(Array),default:()=>[]}}),V={key:1},L=S({name:"ElDescriptionsRow"});var M=q(S({...L,props:U,setup(_){const o=J(C,{});return(e,$)=>s(o).direction==="vertical"?(a(),b(v,{key:0},[h("tr",null,[(a(!0),b(v,null,N(e.row,(n,c)=>(a(),A(s(k),{key:`tr1-${c}`,cell:n,tag:"th",type:"label"},null,8,["cell"]))),128))]),h("tr",null,[(a(!0),b(v,null,N(e.row,(n,c)=>(a(),A(s(k),{key:`tr2-${c}`,cell:n,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(a(),b("tr",V,[(a(!0),b(v,null,N(e.row,(n,c)=>(a(),b(v,{key:`tr3-${c}`},[s(o).border?(a(),b(v,{key:0},[j(s(k),{cell:n,tag:"td",type:"label"},null,8,["cell"]),j(s(k),{cell:n,tag:"td",type:"content"},null,8,["cell"])],64)):(a(),A(s(k),{key:1,cell:n,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 T=W({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=q(S({...X,props:T,setup(_){const o=_,e=Q("descriptions"),$=ol(),n=cl();pl(C,o);const c=ul(()=>[e.b(),e.m($.value)]),x=(l,u,r,t=!1)=>(l.props||(l.props={}),u>r&&(l.props.span=r),t&&(l.props.span=u),l),i=()=>{if(!n.default)return[];const l=yl(n.default()).filter(d=>{var y;return((y=d==null?void 0:d.type)==null?void 0:y.name)==="ElDescriptionsItem"}),u=[];let r=[],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 E=o.column-g%o.column;return r.push(x(d,E,t,!0)),void u.push(r)}m<t?(t-=m,r.push(d)):(r.push(x(d,m,t)),u.push(r),t=o.column,r=[])}),u};return(l,u)=>(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"))},[h("div",{class:w(s(e).e("title"))},[G(l.$slots,"title",{},()=>[H(O(l.title),1)])],2),h("div",{class:w(s(e).e("extra"))},[G(l.$slots,"extra",{},()=>[H(O(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),b(v,null,N(i(),(r,t)=>(a(),A(M,{key:t,row:r},null,8,["row"]))),128))])],2)],2)],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/description.vue"]]);let I;I=S({name:"ElDescriptionsItem",props:W({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:""}})}),R=bl(Y,{DescriptionsItem:I}),P=ml(I)});export{P as E,vl as __tla,R as a};
