import{d as Z,ah as f,Z as B,K as $,bn as G,aU as H,r as I,o as r,c as v,$ as p,a as t,g as x,n as u,t as m,v as h,w as s,Q as g,f as b,a1 as J,j as L,bh as N,dA as R,x as S,a5 as V,ak as j,aY as W,aD as d,F as X,q as aa,bE as ea,__tla as ta}from"./index-04f8d540.js";import{E as la,a as ra,__tla as sa}from"./el-descriptions-item-acdf7c6c.js";import{_ as oa,__tla as da}from"./DictTag-774e4f97.js";let D,na=Promise.all([(()=>{try{return ta}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{let k;k={class:"flex items-center"},D=Z({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(e){const F=B(),O=$(()=>F.getMobile),q=G(),z=H(),_=e,{getPrefixCls:A}=J(),n=A("descriptions"),C=$(()=>{const l=["title","message","collapse","schema","data","class"],c={...q,..._};for(const o in c)l.indexOf(o)!==-1&&delete c[o];return c}),i=I(!0),E=()=>{_.collapse&&(i.value=!t(i))};return(l,c)=>{const o=L,P=N,T=oa,K=la,M=ra,Q=R;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"])},[e.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",k,[u(m(e.title)+" ",1),e.message?(r(),h(P,{key:0,content:e.message,placement:"right"},{default:s(()=>[b(o,{class:"ml-5px",icon:"ep:warning"})]),_:1},8,["content"])):g("",!0)])],2),e.collapse?(r(),h(o,{key:0,icon:t(i)?"ep:arrow-down":"ep:arrow-up"},null,8,["icon"])):g("",!0)],2)):g("",!0),b(Q,null,{default:s(()=>[S(x("div",{class:p([`${t(n)}-content`,"p-10px"])},[b(M,j({column:_.columns,direction:t(O)?"vertical":"horizontal",border:""},t(C)),W({default:s(()=>[(r(!0),v(X,null,aa(e.schema,a=>(r(),h(K,j({key:a.field,"min-width":"80"},(U=>{const Y=["field"],y={...U};for(const w in y)Y.indexOf(w)!==-1&&delete y[w];return y})(a)),{label:s(()=>[d(l.$slots,`${a.field}-label`,{row:{label:a.label}},()=>[u(m(a.label),1)],!0)]),default:s(()=>[a.dateFormat?d(l.$slots,"default",{key:0},()=>[u(m(e.data[a.field]!==null?t(ea)(e.data[a.field]).format(a.dateFormat):""),1)],!0):a.dictType?d(l.$slots,"default",{key:1},()=>[b(T,{type:a.dictType,value:e.data[a.field]+""},null,8,["type","value"])],!0):d(l.$slots,a.field,{key:2,row:e.data},()=>[u(m(e.data[a.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),[[V,t(i)]])]),_:3})],2)}}})});export{D as _,na as __tla};
