import{d as R,ar as f,y as W,e as $,a_ as X,aX as Z,r as q,o as r,c as v,ac as p,a as t,C as x,E as m,G as u,A as h,B as s,D as k,f as _,ae as J,_ as K,bh as L,dI as Q,k as S,v as U,m as C,aZ as V,aN as d,F as Y,R as ee,H as ae,__tla as te}from"./index-92ad187a.js";import{E as le,a as re,__tla as se}from"./el-descriptions-item-809b8296.js";import{_ as oe,__tla as de}from"./DictTag.vue_vue_type_script_lang-96bcb962.js";let D,ne=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return de}catch{}})()]).then(async()=>{let g;g={class:"flex items-center"},D=R({name:"Descriptions",__name:"Descriptions",props:{title:f.string.def(""),message:f.string.def(""),collapse:f.bool.def(!0),columns:f.number.def(1),schema:{type:Array,default:()=>[]},data:{type:Object,default:()=>({})}},setup(a){const F=W(),O=$(()=>F.getMobile),j=X(),z=Z(),b=a,{getPrefixCls:A}=J(),n=A("descriptions"),B=$(()=>{const l=["title","message","collapse","schema","data","class"],c={...j,...b};for(const o in c)l.indexOf(o)!==-1&&delete c[o];return c}),i=q(!0),E=()=>{b.collapse&&(i.value=!t(i))};return(l,c)=>{const o=K,P=L,T=oe,G=le,H=re,I=Q;return r(),v("div",{class:p([t(n),"bg-[var(--el-color-white)] dark:bg-[var(--el-bg-color)] dark:border-[var(--el-border-color)] dark:border-1px"])},[a.title?(r(),v("div",{key:0,class:p([`${t(n)}-header`,"h-50px flex justify-between items-center b-b-1 border-solid border-[var(--el-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]"]),onClick:E},[x("div",{class:p([`${t(n)}-header__title`,"relative font-18px font-bold ml-10px"])},[x("div",g,[m(u(a.title)+" ",1),a.message?(r(),h(P,{key:0,content:a.message,placement:"right"},{default:s(()=>[_(o,{class:"ml-5px",icon:"ep:warning"})]),_:1},8,["content"])):k("",!0)])],2),a.collapse?(r(),h(o,{key:0,icon:t(i)?"ep:arrow-down":"ep:arrow-up"},null,8,["icon"])):k("",!0)],2)):k("",!0),_(I,null,{default:s(()=>[S(x("div",{class:p([`${t(n)}-content`,"p-10px"])},[_(H,C({column:b.columns,direction:t(O)?"vertical":"horizontal",border:""},t(B)),V({default:s(()=>[(r(!0),v(Y,null,ee(a.schema,e=>(r(),h(G,C({key:e.field,"min-width":"80"},(M=>{const N=["field"],y={...M};for(const w in y)N.indexOf(w)!==-1&&delete y[w];return y})(e)),{label:s(()=>[d(l.$slots,`${e.field}-label`,{row:{label:e.label}},()=>[m(u(e.label),1)],!0)]),default:s(()=>[e.dateFormat?d(l.$slots,"default",{key:0},()=>[m(u(a.data[e.field]!==null?t(ae)(a.data[e.field]).format(e.dateFormat):""),1)],!0):e.dictType?d(l.$slots,"default",{key:1},()=>[_(T,{type:e.dictType,value:a.data[e.field]+""},null,8,["type","value"])],!0):d(l.$slots,e.field,{key:2,row:a.data},()=>[m(u(a.data[e.field]),1)],!0)]),_:2},1040))),128))]),_:2},[t(z).extra?{name:"extra",fn:s(()=>[d(l.$slots,"extra",{},void 0,!0)]),key:"0"}:void 0]),1040,["column","direction"])],2),[[U,t(i)]])]),_:3})],2)}}})});export{D as _,ne as __tla};
