import{h as c}from"./axios.config-ca0d2d18.js";import{y as e}from"./index-ece68a0b.js";import{c as i}from"./dateTime-1069f6fe.js";const u=t=>{var r,s,n,o;const a={limit:t.limit,page:t.page,order_by:t.order_by};return t.status&&t.status!=="ALL"&&(a.status=t.status),t.transactionId&&(a.transaction_id=t.transactionId),t.accountType!=="ALL"&&(a.payment_system_id=t.accountType),(r=t.date)!=null&&r[0]&&(a.date_from=i(t.date[0],(s=e.userInfo)==null?void 0:s.time_zone)),(n=t.date)!=null&&n[1]&&(a.date_to=i(t.date[1],(o=e.userInfo)==null?void 0:o.time_zone)),a},y={async getTransactions(t){return await c.get("/user/account/transactions",{params:{...u(t)}})},async getTransactionsByAccountId(t){return await c.get(`/user/account/${t.accountId}/transactions`,{params:{...u(t)}})}};export{y as t};
