export default function useInvoice() {
  function getBySubscriptionId({ search = "", id = "", page = 1 } = {}) {
    return useNuxtApp().$api<Record<string, any>>(
      `/api/invoices/subscription/${id}`,
      {
        method: "GET",
        params: {
          search,
          page,
        },
      }
    );
  }

  return {
    getBySubscriptionId,
  };
}
