import React from "react";


let issue = {
  "id": 1,
  "vin": "1GNGC26RXXJ407648",
  "title": "sometitle",
  "description": "2343242",
  "driver_id": "valid-cognito-id-1",
  "timestamp": "2022-12-09T23:16:38.074858Z",
  "images": [
    {
      "id": 1,
      "image": "SGVsbG8x",
      "issue_id": 1
    }
  ]
}

let issues = [
  { "id": 15, "vin": "4Y1SL65848Z411439", "title": "sometitle", "description": "2343242", "driver_id": "12345", "timestamp": "2022-12-09T23:16:38.074858Z" },
  { "id": 17, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" },
];

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

export const useIssueContext = () => ({
  issue,
  issues,
  deleteIssue: jest.fn(),
  getIssues: jest.fn().mockReturnValue(issues),
  getIssue: jest.fn(),
});