import{d as G,ac as f,S as H,Y as $,bF as I,bc as J,r as K,o as r,c as v,T as p,a as t,g as x,y as u,t as m,x as g,w as s,a0 as h,f as b,V as L,j as N,at as Q,dP as R,z as U,$ as W,af as F,br as X,aC as d,F as Z,v as ee,cS as ae,__tla as te}from"./index-8dc1e40a.js";import{E as le,a as re,__tla as se}from"./el-descriptions-item-bf830d0d.js";import{_ as oe,__tla as de}from"./DictTag-85aade2b.js";let j,ne=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return de}catch{}})()]).then(async()=>{let k;k={class:"flex items-center"},j=G({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 C=H(),O=$(()=>C.getMobile),P=I(),T=J(),_=a,{getPrefixCls:z}=L(),n=z("descriptions"),A=$(()=>{const l=["title","message","collapse","schema","data","class"],c={...P,..._};for(const o in c)l.indexOf(o)!==-1&&delete c[o];return c}),i=K(!0),D=()=>{_.collapse&&(i.value=!t(i))};return(l,c)=>{const o=N,E=Q,S=oe,M=le,V=re,Y=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"])},[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:D},[x("div",{class:p([`${t(n)}-header__title`,"relative font-18px font-bold ml-10px"])},[x("div",k,[u(m(a.title)+" ",1),a.message?(r(),g(E,{key:0,content:a.message,placement:"right"},{default:s(()=>[b(o,{class:"ml-5px",icon:"ep:warning"})]),_:1},8,["content"])):h("",!0)])],2),a.collapse?(r(),g(o,{key:0,icon:t(i)?"ep:arrow-down":"ep:arrow-up"},null,8,["icon"])):h("",!0)],2)):h("",!0),b(Y,null,{default:s(()=>[U(x("div",{class:p([`${t(n)}-content`,"p-10px"])},[b(V,F({column:_.columns,direction:t(O)?"vertical":"horizontal",border:""},t(A)),X({default:s(()=>[(r(!0),v(Z,null,ee(a.schema,e=>(r(),g(M,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(S,{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(T).extra?{name:"extra",fn:s(()=>[d(l.$slots,"extra",{},void 0,!0)]),key:"0"}:void 0]),1040,["column","direction"])],2),[[W,t(i)]])]),_:3})],2)}}})});export{j as _,ne as __tla};
