import React from "react";

let uploading = false;
let progress = 0;
let status = null;
let files = null;

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

export const useFileUploadContext = () => ({
  uploading,
  progress,
  status,
  files,
  upload: jest.fn(),
  cancel: jest.fn(),
  setFiles: jest.fn((value) => {
    files = value;
  }),
});
