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