/* eslint-disable @cspell/spellchecker */
import { createQueryKeys, mergeQueryKeys } from '@lukemorales/query-key-factory';

const appDataQueryKey = createQueryKeys('appData', {
  appInfo: null,
});

const myWalletQueryKey = createQueryKeys('myWallet', {
  walletReadList: ({ paging, search }) => [{ paging, search }],
  walletRead: ({ tbAcnutMastr }) => [{ tbAcnutMastr }],
});

const comCodeQueryKey = createQueryKeys('comCode', {
  codeManage: ({ id }) => [{ id }],
});

const exchangeQueryKey = createQueryKeys('exchange', {
  findRecipient: ({ aliasNm, trgetInstt, bizNo }) => [{ aliasNm, trgetInstt, bizNo }],
  recentRecipients: ({ paging, search }) => [{ paging, search }],
});

const shopListQueryKey = createQueryKeys('shopList', {
  getShopList: ({ paging, search }) => [{ paging, search }],
});

const notificationQueryKey = createQueryKeys('notification', {
  notificationList: ({ paging, search }) => [{ paging, search }],
});

const cstrQueryKey = createQueryKeys('cstr', {
  cstmr: ({ cstmrNo }) => [{ cstmrNo }],
});

export const queries = mergeQueryKeys(
  appDataQueryKey,
  myWalletQueryKey,
  comCodeQueryKey,
  exchangeQueryKey,
  shopListQueryKey,
  notificationQueryKey,
  cstrQueryKey,
);
