import { usePagination } from "@erp/core/hooks";
import { PropsWithChildren, createContext } from "react";

export type IInvoicesContextState = {};

export const InvoicesContext = createContext<IInvoicesContextState | null>(null);

export const InvoicesProvider = ({ children }: PropsWithChildren) => {
  const [pagination, setPagination] = usePagination();

  return (
    <InvoicesContext.Provider
      value={{
        pagination,
        setPagination,
      }}
    >
      <div className='invoices-layout'>{children}</div>
    </InvoicesContext.Provider>
  );
};
