import * as dotenv from 'dotenv'
import { faker } from '@faker-js/faker'
dotenv.config()

interface TestData {
  auth: {
    homeowner: { email: string; password: string }
    contractor: { email: string; password: string }
    admin: { email: string; password: string }
  }
  organization: {
    name: string
    state: string
    balance: number
  }
  contact: {
    firstName: string
    lastName: string
    email: string
    phone: string
    role: string
    notes: string
  }
}

export const testData: TestData = {
  auth: {
    homeowner: {
      email: 'test.email@mail.com',
      password: '123',
    },
    contractor: {
      email: 'test.email@mail.com',
      password: '123',
    },
    admin: {
      email: 'test.email@mail.com',
      password: '123',
    },
  },
  organization: {
    name: faker.company.name(),
    state: faker.location.state(),
    balance: parseFloat(faker.finance.amount({ min: 1, max: 99999999999 })),
  },
  contact: {
    firstName: faker.person.firstName(),
    lastName: faker.person.lastName(),
    email: faker.internet.email(),
    phone: faker.phone.number({ style: 'national' }),
    role: faker.person.jobTitle(),
    notes: faker.lorem.sentences(2),
  },
}