import{h as T}from"./index.f7d6ad1f.js";import{q as V,w as b,bd as P,B as c,a2 as q,C as H,r as d,o as r,n as f,p as v,t as _,H as h,I,J as K,v as N,K as y,N as A,aY as O}from"./index.d8ce26ef.js";import{Q as p}from"./query.46f73070.js";import{u as Q}from"./use-response-handle.e6cae34f.js";import U from"./anchor.3f5e0a13.js";import"./index.a76369db.js";import"./purchase.ef537ae7.js";import"./types.4990a8fc.js";import"./purchase.3e9c8933.js";import"./status.fad06285.js";import"./basic-descriptions.43c3a1ff.js";import"./index.79955875.js";import"./reconciliation.82f07005.js";import"./reconciliation.0978f225.js";import"./index.5e89c2fa.js";import"./sale.6829bd5b.js";import"./sale.15181288.js";import"./index.7837d3fb.js";import"./payment.f2e48df5.js";import"./purchPay.6dca9740.js";import"./index.b9ac122c.js";import"./ticket-return.a2b6ff94.js";import"./ticket-return.b25ae9d8.js";import"./index.41dcc163.js";import"./tradelog.418c50b4.js";import"./tragelog.c677ba3b.js";import"./index.38f67443.js";import"./trade.ae5484f6.js";import"./index.b903a898.js";import"./refund.db9931c7.js";import"./index.7ba913e4.js";import"./inv-return.8a53631f.js";import"./inv-return.7e479c21.js";import"./index.b38c0e7a.js";import"./inv-open.bbbefaa0.js";import"./inv-open.f70179a7.js";const Y={class:"main flex h-full"},j={"bg-white":"","min-w-230px":""},F={"bg-white":"","flex-1":""},Re=V({__name:"detail",setup(J){const{query:g}=b(),k=Q(),i=P([]),l=c([]),n=c(new Map),w=q(()=>g.id),C=(t,e)=>{var a;const o=p[t].responseKey;return e[o]&&((a=p[t])==null?void 0:a.detail)&&e[o].length!==0};function D(t){return Object.keys(p).filter(o=>C(o,t)).map(o=>{const{api:a,component:s,requesetProp:m,responseKey:u,detail:M}=p[o],R=t[u];return{component:s,prop:m,title:M,api:a,value:R,key:o}})}async function E(){const{code:t,message:e,data:o}=await T({id:w.value});k({code:t,message:e,handler:()=>i.value=D(o)})}async function x(){await E(),i.value.forEach((t,e)=>{l.value.push(t.key),n.value.set(t.title,{top:"",index:e})})}function B(t,e){const o=n.value.get(e);n.value.set(e,{...o,top:t})}return H(()=>x()),(t,e)=>{const o=d("ElCollapseItem"),a=d("ElCollapse");return r(),f("div",Y,[v("div",j,[_(U,{map:n.value},null,8,["map"])]),v("div",F,[_(a,{modelValue:l.value,"onUpdate:modelValue":e[1]||(e[1]=s=>l.value=s)},{default:h(()=>[(r(!0),f(I,null,K(N(i),s=>(r(),y(o,{title:s.title,name:s.key,key:s.key},{default:h(()=>[(r(),y(A(s.component),O(s,{onMapOffsetTop:e[0]||(e[0]=({top:m,title:u})=>B(m,u))}),null,16))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])])}}});export{Re as default};
