interface destination {
  min: number;
  max: number;
}

interface foundationDate {
  min: number;
  max: number;
}

export interface Job {
  id: number;
  logo: string;
  title: string;
  company: Company;
  location: string;
  time: string;
  salary: string;
  jobType: JobType[];
  link: string;
  tag: string;
  destination: destination;
  category: string;
  created_at: string;
  createdAt: string;
  experience: string;
  totalSalary: TotalSalary;
  cmpanyLogoUrl: string;
  applications?: JobApplication[];
  skillExams?: any[];
}

interface TotalSalary {
  min: number;
  max: number;
}

interface JobType {
  styleClass: string;
  type: string;
}

export interface Candidate {
  id: number;
  avatar: string;
  name: string;
  slug: string;
  designation: string;
  location: string;
  hourlyRate: string;
  tags: string[];
  destination: destination;
  category: string;
  gender: string;
  created_at: string;
  experience: string;
  qualification: string;
  joinedDate: string;
}

export interface Answer {
  text: string;
  correct: boolean;
}

export interface Question {
  question: string;
  answers: Answer[];
}

export interface QuestionTopic {
  name: string;
  questions: Question[];
}

export interface TokenResponse {
  jwtToken: string;
  refreshToken: string;
  exception: string;
  message: string;
  name: string;
  profileType: string;
  status?: number;
}
export interface Tokens {
  jwtToken: string;
  refreshToken: string;
  name: string;
  profileType: string;
  referrer?: string;
}

export interface AuthContextType {
  setTokenCookie: ({}: Tokens) => Promise<void>;
  logout: () => Promise<void>;
  userRole: string;
  name: string;
  setProfileType: (profile: string) => void;
  isAuthenticated: boolean;
}

interface CompanyRegisterData {
  companyName: string;
  companyEmail: string;
  companyPhone: string;
  companyPassword: string;
  loginMethod?: AuthMethod;
}

interface loginUserInfo {
  name: string;
  profileType: string;
}

interface UserRole {
  userRole: string;
}

interface InterviewsResp {
  resp: InterviewsRespData;
  status: number;
}

interface InterviewsRespData {
  meta: Meta;
  data: InterviewData[];
  companies?: Number;
  candidates?: Number;
}

interface InterviewResp {
  resp: InterviewData;
  status: number;
}

interface InterviewData {
  id: number;
  jobId: number;
  candidateId: number;
  companyId: number;
  meetingLink: string;
  meetingDate: string;
  meetingStatus: string;
  meetingTitle: string;
  rescheduleStatus: string;
  rescheduleRequestedDate: string;
  rescheduleRequestedLink: string;
  attendees: {
    attendee: string;
  }[];
  company: {
    id: number;
    name: string;
    description?: string;
    website?: string;
    contactPerson?: string;
    contactEmail?: string;
    profilePictureUrl?: string;
  };
  candidate: {
    id: number;
    firstName: string;
    lastName: string;
  };
  jobPost: {
    id: number;
    title: string;
  };
  interviewRating?: {
    interviewId: number;
    overallExperience: number;
    interviewerProfessionalism: number;
    communicationClarity: number;
    fairnessOfQuestions: number;
    wouldRecommend: number;
    remarks?: string | null;
    createdAt?: string;
    updatedAt?: string;
  } | null;
}

interface SavedJobsResp {
  data: SavedJobsData[];
  meta: Meta;
}

interface SavedJobsData {
  candidateId: number;
  id: number;
  jobPost: Job;
  jobPostId: number;
}

interface NotificationData {
  id: number;
  candidateId: number;
  jobId: number;
  companyId: number;
  status: "read" | "unread";
  message: string;
  jobPost: Job;
  createdAt: string;
}

interface EmailResponse {
  resp: string;
  status: number;
}
interface EmailFormat {
  toAddresses: [string];
  subject: string;
  body: string;
}
