import React from "react";

const ManifestsContext = React.createContext();

let busy = false;
let manifests = [
  {
    id: 1,
    name: "Test Manifest",
    version: "1.0",
    created: "2021-07-01T22:40:07.778509Z",
    updated: "2021-07-12T18:22:13.736755Z",
  },
];
let totalManifests = 1;

export const ManifestsProvider = ({ children }) => {
  return <div data-testid="mocked-manifestsprovider">{children}</div>;
};

export const useManifestsContext = () => ({
  busy,
  manifests,
  totalManifests,
  getManifests: jest.fn(() => manifests),
  deleteManifest: jest.fn(),
});
