import{d as G,p,V as H,b as $,bk as I,cs as J,r as K,o as r,c as v,W as f,a as t,g as x,j as u,t as m,l as k,w as s,a2 as g,i as b,Y as L,v as N,aw as Q,dO as R,C as S,a1 as U,ai as F,ct as X,aF as d,F as Z,k as ee,cb as ae,__tla as te}from"./index-8c6726e5.js";import{E as le,a as re,__tla as se}from"./el-descriptions-item-154084ea.js";import{_ as oe,__tla as de}from"./DictTag-bbdf2078.js";let O,ie=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return de}catch{}})()]).then(async()=>{let h;h={class:"flex items-center"},O=G({name:"Descriptions",__name:"Descriptions",props:{title:p.string.def(""),message:p.string.def(""),collapse:p.bool.def(!0),columns:p.number.def(1),schema:{type:Array,default:()=>[]},data:{type:Object,default:()=>({})}},setup(a){const j=H(),C=$(()=>j.getMobile),P=I(),D=J(),_=a,{getPrefixCls:M}=L(),i=M("descriptions"),T=$(()=>{const l=["title","message","collapse","schema","data","class"],c={...P,..._};for(const o in c)l.indexOf(o)!==-1&&delete c[o];return c}),n=K(!0),z=()=>{_.collapse&&(n.value=!t(n))};return(l,c)=>{const o=N,A=Q,E=oe,V=le,W=re,Y=R;return r(),v("div",{class:f([t(i),"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:f([`${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:z},[x("div",{class:f([`${t(i)}-header__title`,"relative font-18px font-bold ml-10px"])},[x("div",h,[u(m(a.title)+" ",1),a.message?(r(),k(A,{key:0,content:a.message,placement:"right"},{default:s(()=>[b(o,{class:"ml-5px",icon:"ep:warning"})]),_:1},8,["content"])):g("",!0)])],2),a.collapse?(r(),k(o,{key:0,icon:t(n)?"ep:arrow-down":"ep:arrow-up"},null,8,["icon"])):g("",!0)],2)):g("",!0),b(Y,null,{default:s(()=>[S(x("div",{class:f([`${t(i)}-content`,"p-10px"])},[b(W,F({column:_.columns,direction:t(C)?"vertical":"horizontal",border:""},t(T)),X({default:s(()=>[(r(!0),v(Z,null,ee(a.schema,e=>(r(),k(V,F({key:e.field,"min-width":"80"},(q=>{const B=["field"],y={...q};for(const w in y)B.indexOf(w)!==-1&&delete y[w];return y})(e)),{label:s(()=>[d(l.$slots,`${e.field}-label`,{row:{label:e.label}},()=>[u(m(e.label),1)],!0)]),default:s(()=>[e.dateFormat?d(l.$slots,"default",{key:0},()=>[u(m(a.data[e.field]!==null?t(ae)(a.data[e.field]).format(e.dateFormat):""),1)],!0):e.dictType?d(l.$slots,"default",{key:1},()=>[b(E,{type:e.dictType,value:a.data[e.field]+""},null,8,["type","value"])],!0):d(l.$slots,e.field,{key:2,row:a.data},()=>[u(m(a.data[e.field]),1)],!0)]),_:2},1040))),128))]),_:2},[t(D).extra?{name:"extra",fn:s(()=>[d(l.$slots,"extra",{},void 0,!0)]),key:"0"}:void 0]),1040,["column","direction"])],2),[[U,t(n)]])]),_:3})],2)}}})});export{O as _,ie as __tla};
