import{t as e}from"./charges-table-CIL9Y7el.js";import{Eu as t,Nl as n,No as r,Od as i,Pd as a,Td as o,rr as s,zd as c}from"./index-Q5R6-AeA.js";var l=c(a(),1),u=t(),d=({chargeId:t})=>{let{chargeId:a}=i(),c=t||a,d;try{d=o()}catch{}let[{data:f,fetching:p},m]=n({query:r,pause:!c||!!d,variables:{chargeId:c??``}});(0,l.useEffect)(()=>{c&&!d&&m()},[c,d,m]);let h=d||f;return c?!d&&p?(0,u.jsx)(s,{}):(0,u.jsx)(e,{data:h?.charge?[h.charge]:[],isAllOpened:!0}):(0,u.jsx)(`div`,{children:`Charge not found`})};export{d as Charge};