import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";

const createLoginUriView = (uri: string): LoginUriView => {
  const view = new LoginUriView();
  view.uri = uri;
  return view;
};

export const mockCiphers: any[] = [
  {
    initializerKey: 1,
    id: "cbea34a8-bde4-46ad-9d19-b05001228ab1",
    organizationId: null,
    folderId: null,
    name: "Weak Password Cipher",
    notes: null,
    isDeleted: false,
    type: 1,
    favorite: false,
    organizationUseTotp: false,
    login: {
      password: "123",
      hasUris: true,
      uris: [
        createLoginUriView("101domain.com"),
        createLoginUriView("www.google.com"),
        createLoginUriView("accounts.google.com"),
        createLoginUriView("https://www.google.com"),
        createLoginUriView("https://www.google.com/login"),
      ],
    },
    edit: false,
    viewPassword: true,
    collectionIds: [],
    revisionDate: "2023-08-03T17:40:59.793Z",
    creationDate: "2023-08-03T17:40:59.793Z",
    deletedDate: null,
    reprompt: 0,
    localData: null,
  },
  {
    initializerKey: 1,
    id: "cbea34a8-bde4-46ad-9d19-b05001228cd3",
    organizationId: null,
    folderId: null,
    name: "Strong Password Cipher",
    notes: null,
    type: 1,
    favorite: false,
    organizationUseTotp: false,
    login: {
      password: "Password!123",
      hasUris: true,
      uris: [createLoginUriView("http://example.com")],
    },
    edit: true,
    viewPassword: true,
    collectionIds: [],
    revisionDate: "2023-08-03T17:40:59.793Z",
    creationDate: "2023-08-03T17:40:59.793Z",
    deletedDate: null,
    reprompt: 0,
    localData: null,
  },
  {
    initializerKey: 1,
    id: "cbea34a8-bde4-46ad-9d19-b05001228ab2",
    organizationId: null,
    folderId: null,
    name: "Strong password Cipher",
    notes: null,
    type: 1,
    favorite: false,
    organizationUseTotp: false,
    login: {
      hasUris: true,
      password: "Password!1234",
      uris: [createLoginUriView("101domain.com")],
    },
    edit: true,
    viewPassword: true,
    collectionIds: [],
    revisionDate: "2023-08-03T17:40:59.793Z",
    creationDate: "2023-08-03T17:40:59.793Z",
    deletedDate: null,
    reprompt: 0,
    localData: null,
  },
  {
    initializerKey: 1,
    id: "cbea34a8-bde4-46ad-9d19-b05001228xy4",
    organizationId: null,
    folderId: null,
    name: "Strong password Cipher",
    notes: null,
    type: 1,
    favorite: false,
    organizationUseTotp: false,
    login: {
      hasUris: true,
      password: "Password!123",
      uris: [createLoginUriView("example.com")],
    },
    edit: true,
    viewPassword: true,
    collectionIds: [],
    revisionDate: "2023-08-03T17:40:59.793Z",
    creationDate: "2023-08-03T17:40:59.793Z",
    deletedDate: null,
    reprompt: 0,
    localData: null,
  },
  {
    initializerKey: 1,
    id: "cbea34a8-bde4-46ad-9d19-b05001227nm5",
    organizationId: null,
    folderId: null,
    name: "Exposed password Cipher",
    notes: null,
    type: 1,
    favorite: false,
    organizationUseTotp: false,
    login: {
      hasUris: true,
      password: "123",
      uris: [createLoginUriView("123formbuilder.com"), createLoginUriView("www.google.com")],
    },
    edit: true,
    viewPassword: true,
    collectionIds: [],
    revisionDate: "2023-08-03T17:40:59.793Z",
    creationDate: "2023-08-03T17:40:59.793Z",
    deletedDate: null,
    reprompt: 0,
    localData: null,
  },
  {
    initializerKey: 1,
    id: "cbea34a8-bde4-46ad-9d19-b05001227tt1",
    organizationId: null,
    folderId: null,
    name: "Secure Co Login",
    notes: null,
    type: 1,
    favorite: false,
    organizationUseTotp: false,
    login: {
      hasUris: true,
      password: "4gRyhhOX2Og2p0",
      uris: [createLoginUriView("SecureCo.com")],
    },
    edit: true,
    viewPassword: true,
    collectionIds: [],
    revisionDate: "2023-08-03T17:40:59.793Z",
    creationDate: "2023-08-03T17:40:59.793Z",
    deletedDate: null,
    reprompt: 0,
    localData: null,
  },
];
