import{d as S,b0 as O,d5 as U,bw as q,f as B,P as C,bW as N,d6 as V,e as W,a$ as X,a as s,o as a,c as b,C as h,F as f,i as _,g as z,k as F,_ as P,cc as Y,bz as Z,bT as ll,a_ as el,ad as tl,n as w,j as R,O as T,D as G,h as sl,d7 as al,q as rl,s as nl}from"./index-CHTXMeh8.js";const I=Symbol("elDescriptions");var x=S({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup:()=>({descriptions:O(I,{})}),render(){var k,o,e,$,r,c,D;const i=U(this.cell),l=(((k=this.cell)==null?void 0:k.dirs)||[]).map(J=>{const{dir:K,arg:L,modifiers:M,value:Q}=J;return[K,Q,L,M]}),{border:p,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=(D=(c=(r=this.cell)==null?void 0:r.children)==null?void 0:c.default)==null?void 0:D.call(c),y=i.span,m=i.align?`is-${i.align}`:"",v=i.labelAlign?`is-${i.labelAlign}`:m,E=i.className,j=i.labelClassName,A={width:q(i.width),minWidth:q(i.minWidth)},d=B("descriptions");switch(this.type){case"label":return C(N(this.tag,{style:A,class:[d.e("cell"),d.e("label"),d.is("bordered-label",p),d.is("vertical-label",t),v,j],colSpan:t?y:1},g),l);case"content":return C(N(this.tag,{style:A,class:[d.e("cell"),d.e("content"),d.is("bordered-content",p),d.is("vertical-content",t),m,E],colSpan:t?y:2*y-1},u),l);default:return C(N("td",{style:A,class:[d.e("cell"),m],colSpan:y},[V(g)?void 0:N("span",{class:[d.e("label"),j]},g),N("span",{class:[d.e("content"),E]},u)]),l)}}});const il=W({row:{type:X(Array),default:()=>[]}}),ol={key:1},cl=S({name:"ElDescriptionsRow"});var dl=P(S({...cl,props:il,setup(k){const o=O(I,{});return(e,$)=>s(o).direction==="vertical"?(a(),b(f,{key:0},[h("tr",null,[(a(!0),b(f,null,_(e.row,(r,c)=>(a(),z(s(x),{key:`tr1-${c}`,cell:r,tag:"th",type:"label"},null,8,["cell"]))),128))]),h("tr",null,[(a(!0),b(f,null,_(e.row,(r,c)=>(a(),z(s(x),{key:`tr2-${c}`,cell:r,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(a(),b("tr",ol,[(a(!0),b(f,null,_(e.row,(r,c)=>(a(),b(f,{key:`tr3-${c}`},[s(o).border?(a(),b(f,{key:0},[F(s(x),{cell:r,tag:"td",type:"label"},null,8,["cell"]),F(s(x),{cell:r,tag:"td",type:"content"},null,8,["cell"])],64)):(a(),z(s(x),{key:1,cell:r,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}}),[["__file","descriptions-row.vue"]]);const pl=W({border:{type:Boolean,default:!1},column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Y,title:{type:String,default:""},extra:{type:String,default:""}}),ul=S({name:"ElDescriptions"});var yl=P(S({...ul,props:pl,setup(k){const o=k,e=B("descriptions"),$=Z(),r=ll();el(I,o);const c=tl(()=>[e.b(),e.m($.value)]),D=(l,p,n,t=!1)=>(l.props||(l.props={}),p>n&&(l.props.span=n),t&&(l.props.span=p),l),i=()=>{if(!r.default)return[];const l=al(r.default()).filter(u=>{var y;return((y=u==null?void 0:u.type)==null?void 0:y.name)==="ElDescriptionsItem"}),p=[];let n=[],t=o.column,g=0;return l.forEach((u,y)=>{var m;const v=((m=u.props)==null?void 0:m.span)||1;if(yt?t:v),y===l.length-1){const E=o.column-g%o.column;return n.push(D(u,E,t,!0)),void p.push(n)}v(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"))},[R(l.$slots,"title",{},()=>[T(G(l.title),1)])],2),h("div",{class:w(s(e).e("extra"))},[R(l.$slots,"extra",{},()=>[T(G(l.extra),1)])],2)],2)):sl("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(f,null,_(i(),(n,t)=>(a(),z(dl,{key:t,row:n},null,8,["row"]))),128))])],2)],2)],2))}}),[["__file","description.vue"]]);const H=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:""}})}),bl=rl(yl,{DescriptionsItem:H}),vl=nl(H);export{vl as E,bl as a};