import{d as B,ai as f,$ as H,L as $,b4 as I,b2 as J,r as K,o as r,c as v,a0 as p,a as t,h as x,q as u,t as m,x as h,w as s,R as g,g as b,a2 as Q,k as S,b6 as U,dC as V,y as W,a6 as X,al as C,aN as Y,aG as d,F as Z,v as aa,c1 as ea,__tla as ta}from"./index-7d5b26d3.js";import{E as la,a as ra,__tla as sa}from"./el-descriptions-item-bfa341f2.js";import{_ as oa,__tla as da}from"./DictTag-89bfbd38.js";let F,ia=Promise.all([(()=>{try{return ta}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{let k;k={class:"flex items-center"},F=B({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 O=H(),j=$(()=>O.getMobile),D=I(),E=J(),_=e,{getPrefixCls:G}=Q(),i=G("descriptions"),P=$(()=>{const l=["title","message","collapse","schema","data","class"],c={...D,..._};for(const o in c)l.indexOf(o)!==-1&&delete c[o];return c}),n=K(!0),T=()=>{_.collapse&&(n.value=!t(n))};return(l,c)=>{const o=S,q=U,z=oa,A=la,L=ra,M=V;return r(),v("div",{class:p([t(i),"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(i)}-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:T},[x("div",{class:p([`${t(i)}-header__title`,"relative font-18px font-bold ml-10px"])},[x("div",k,[u(m(e.title)+" ",1),e.message?(r(),h(q,{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(n)?"ep:arrow-down":"ep:arrow-up"},null,8,["icon"])):g("",!0)],2)):g("",!0),b(M,null,{default:s(()=>[W(x("div",{class:p([`${t(i)}-content`,"p-10px"])},[b(L,C({column:_.columns,direction:t(j)?"vertical":"horizontal",border:""},t(P)),Y({default:s(()=>[(r(!0),v(Z,null,aa(e.schema,a=>(r(),h(A,C({key:a.field,"min-width":"80"},(N=>{const R=["field"],y={...N};for(const w in y)R.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(z,{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(E).extra?{name:"extra",fn:s(()=>[d(l.$slots,"extra",{},void 0,!0)]),key:"0"}:void 0]),1040,["column","direction"])],2),[[X,t(n)]])]),_:3})],2)}}})});export{F as _,ia as __tla};
