interface Job {
  id: number | null;
  title: string;
  description: string;
  companyId: number | null;
  industryId: number | null;
  openingDate: string;
  closingDate: string;
  createdAt: string;
  updatedAt: string;
  company: Company;
  industry?: Industry;
  location: string | null;
  category?: string;
  jobType?: string;
  experienceLevel?: string;
  responsibilitiesAndDuties?: string;
  cmpanyLogoUrl?: string;
  salary: string | null;
  companyInformation?: string;
  contactInformation?: string;
  companyBranding?: string;
  benefits?: string;
  employmentTypes?: EmploymentTypes[];
  isDraft?: boolean;
  skills?: any[];
  loading?: boolean;
  qualifications?: {
    id: number;
    name: string;
  }[];
  isSaved?: boolean;
  workMode?: WorkMode[];
  skillExamId?: number | null;
  skillExams?: any[];
}

interface EmploymentTypes {
  id: number;
  name: string;
}

interface Meta {
  currentPage: number;
  firstPage: number;
  firstPageUrl: string;
  lastPage: number;
  lastPageUrl: string;
  nextPageUrl: string | null;
  perPage: number;
  previousPageUrl: string | null;
  total: number;
}
interface FilterJobsResp {
  resp: FilterJobs;
  status: number;
}
interface FilterJobs {
  meta: Meta;
  data: Job[];
}
interface FilterCandidatesResp {
  resp: FilterCandidate;
  status: number;
}
interface FilterCandidate {
  meta: Meta;
  data: CandidateProfileDetails[];
}
interface CompaniesResponse {
  resp: FilterCompanies;
  status: number;
}
interface FilterCompanies {
  meta: Meta;
  data: Company[];
}

interface Company {
  id: number;
  name: string;
  description: string;
  website: string;
  contactPerson: string;
  contactEmail: string;
  contactPhone: string;
  foundationDate: string;
  employeeCount: number;
  userId: number;
  createdAt: string;
  updatedAt: string;
  location: string;
  profilePictureUrl?: string;
}

interface Industry {
  id: number;
  name: string;
  createdAt: string;
  updatedAt: string;
}

interface skillSelect {
  value: number;
  label: string;
}
interface quaificationSelect {
  value: number;
  label: string;
}
interface emplymentTypeSelect {
  value: number;
  label: string;
}

interface IndustrySelect {
  value: number;
  label: string;
}
interface Select {
  value: number;
  label: string;
}

interface SkillResponse {
  meta: Meta;
  data: SkillResponseData[];
}

interface SkillResponseData {
  id: number;
  name: string;
  createdAt: string;
  updatedAt: string;
}

interface IndustryResponse {
  meta: Meta;
  data: IndustryResponseData[];
}

interface IndustryResponseData {
  id: number;
  name: string;
  createdAt: string;
  updatedAt: string;
}

interface JobPostState {
  title: string;
  description: string;
  openingDate: string;
  closingDate: string;
  company_branding: string;
  company_information: string;
  company_logo: string;
  contact_info: string;
  duties_and_responsibilities: string;
  employmentTypes: any;
  qualification: any;
  location: string;
  maxSalary: string;
  minSalary: string;
  skillIds: any;
  isDraft: any;
  benefits: string;
}

interface Response {
  status: number;
  resp: any;
}

interface CompanyDetailsResp {
  resp: Company;
  status: number;
}

interface JobDetailsResp {
  resp: JobDetails;
  status: number;
}
interface JobApplicationStatusResp {
  resp: any;
  status: number;
}

interface JobDetails {
  id: number | null;
  title: string;
  description: string;
  openingDate: string;
  closingDate: string;
  companyId: number | null;
  industryId: number | null;
  createdAt: string;
  updatedAt: string;
  companyLogo: string | null;
  location: string | null;
  salary: string | null;
  skills: Skill[] | null;
  isDraft: boolean;
  company: Company;
  workMode?: WorkMode[];
  skillExams?: {
    id?: number;
    title?: string;
    name?: string;
    duration?: number;
    description?: string;
  }[];
}

interface WorkMode {
  id: number;
  name: string;
}

interface workModeSelect {
  value: number;
  label: string;
}

interface Skill {
  id: number;
  name: string;
}

interface UploadedDocResp {
  id: number;
  title: string;
  documentTypeId: number;
  userId: number;
  createdAt: string;
  updatedAt: string;
  files: UploadedDocFile[];
}

interface UploadedDocFile {
  id: number;
  name: string;
  path: string;
  mimeType: string;
  size: number;
  createdAt: string;
  updatedAt: string;
  url: string;
}

interface DocResponse {
  meta: Meta;
  data: UploadedDocResp[];
}
interface CountryData {
  name: string;
  id: number;
}
interface StatesData {
  name: string;
  id: number;
}
interface CitiesData {
  name: string;
  id: number;
}

interface CreateCV {
  firstName: string;
  lastName: string;
  email: string;
  phone: string;
  designation: string;
  country: Select;
  state: Select;
  city: Select;
  skills: Select[];
  about: string;
  projects: Project;
  education: Education;
  experience: Experience;
  onlineProfile: OnlineProfile;
}

interface Project {
  projectTitle: string;
  projectDetails: string;
}

interface Education {
  degreeLevel: string;
  degreeTitle: string;
  institute: string;
  result: string;
  year: string;
}

interface Experience {
  experienceTitle: string;
  companydegreeLevel: string;
  startDate: string;
  endDate: string;
  currentlyWorking: boolean;
  description: string;
}
interface OnlineProfile {
  platformName: string;
  profileUrl: string;
}

interface CandidateProfileDetails {
  id?: number;
  firstName: string | null;
  lastName: string | null;
  address: string | null;
  birthdate: string | null;
  city: string | null;
  country: string | null;
  gender: string | null;
  phone: string | null;
  pronouns: string | null;
  state: string | null;
  careerObjective: string | null;
  keyAchievement: string | null;
  summary: string | null;
  zipcode: string | null;
  candidateImage: string | null;
  profilePictureUrl: string | null;
  qualificationId: number[] | null;
  skills?: Skill[] | null;
  skillIds?: number[];
  loading: boolean | null;
  applicationsCount: number | null;
  jobAlerts: number | null;
  messageCounts: number | null;
  shortlistCount: number | null;
  applications: Job[] | null;
  notifications: any[] | null;
  email?: string;
  recentJobsApplied: RecentJobsApplied[];
  userId: number;
  shouldVerifyVnin?: boolean;
}
interface RecentJobsApplied {
  month: number;
  count: number;
}

interface CompanyProfileDetails {
  id?: number;
  companyId?: number;
  name: string;
  description: string;
  culture: string;
  values: string;
  opportunities: string;
  userId?: number;
  createdAt: string;
  updatedAt: string;
  location: string;
  positionLookingFor: string;
  position: string;
  profilePicture?: string;
  profilePictureUrl?: string;
  applications?: {
    data: JobApplication[];
  };
  recentJobsPosted: RecentJobsPosted[];
  totalJobsPosted?: number;
  totalUnreadNotification?: number;
  totalShortlistedCandidates?: number;
  totalUnreadMessages?: number;
}

interface RecentJobsPosted {
  month: number;
  count: number;
}

interface CandidateProfileDetailsResp {
  resp: CandidateProfileDetails;
  status: number;
}

interface candidateProfilePictureResp {
  resp: CandidateProfilePicture;
  status: number;
}

interface CandidateProfilePicture {
  candidate_profile_picture: CandidateProfileAndUrl[];
}

interface CandidateProfileAndUrl {
  profilePicture: string;
  profilePictureUrl: string;
}
// interface vninProfilePictureResp {
//   resp: string[] | null;
//   status: number;
// }

interface vninProfilePictureResp {
  resp: vninProfilePicture;
  status: number;
}
interface GuarantorVninProfilePictureResp {
  resp: GuarantorVninProfilePicture;
  status: number;
}

interface GuarantorVninProfilePicture {
  image: string;
  vninImage: string;
}

interface CandidateProfilePicture {
  candidate_profile_picture: CandidateProfileAndUrl[];
  vnin_profile_picture: VninProfileAndUrl[];
}

interface CandidateProfileAndUrl {
  profilePicture: string;
  profilePictureUrl: string;
}

interface VninProfileAndUrl {
  vninProfilePicture: string;
  isCandidate: boolean;
  isCompany: boolean;
}

interface CompanyProfileDetailsResp {
  resp: CompanyProfileDetails;
  status: number;
}

interface SortAndFilterOptionsType {
  sortOption: string | "";
  titleSearchKeyword: string | "";
  locationSearchKeyword: string | "";
  jobTypeKeyword?: string | "";
  workModeKeyword?: string | "";
  datePostedRange?: string | "";
  hasPsychometricResults?: string[];
  gender?: string | "";
  isVerified?: string | "";
}

interface SortAndFilterOptionsTypesForSavedJobs {
  sortOption: string | "";
  datePostedRange?: string | "";
}

interface PostedJobsResp {
  resp: Job[];
  status: number;
  meta: Meta;
}

interface JobApplicationResp {
  resp: {
    approvedCount: Number;
    rejectedCount: Number;
    pendingCount: Number;
    shortlistCount: Number;
    applicants: {
      data: JobApplication[];
      meta: Meta;
    };
  };
  status: number;
}

interface JobApplication {
  id: number;
  candidate: Applicants;
  candidateId: number;
  closed: number;
  jobPostId: number;
  status: string;
  companyId?: number;
  jobPost: Job;
  documents?: UploadedDocResp[];
  createdAt: string;
  applicationGuarantors?: Guarantor[];
  hasInterviewInvitation?: boolean;
  interviewDetails?: {
    id: number;
    meeting_link: string;
    meeting_date: string;
    meeting_status: string;
  } | null;
}

interface Guarantor {
  guarantorId: number;
  id: number;
  candidateId: number;
  isVerified: boolean;
  email: string;
  phone: string;
  name: string;
  designation: string;
  addedBy: number;
}

interface Applicants {
  id?: number;
  firstName: string | null;
  lastName: string | null;
  address: string | null;
  birthdate: string | null;
  city: string | null;
  country: string | null;
  gender: string | null;
  phone: string | null;
  pronouns: string | null;
  state: string | null;
  summary: string | null;
  zipcode: string | null;
  candidateImage: string | null;
  profilePictureUrl: string | null;
  qualificationId: number[];
  skills?: {
    id: number;
    name: string;
  }[];
  examPerformances?: {
    answerSet: {
      id: number;
      title: string;
    }[];
    candidateId: number;
    createdAt: string;
    endTime: string;
    examId: number;
    examType: string;
    id: number;
    score: string;
    startTime: string;
    updatedAt: string;
  }[];
}

interface ApplicationUpdateResp {
  success: boolean;
  message: status;
  status: number;
  data: [number];
}

interface DeleteJobResp {
  resp: DeleteJob;
  status: number;
}

interface DeleteJob {
  success: boolean;
  message: string;
}

interface Souvik {
  id: number;
}

type JobMeta = {
  jobTitle: string;
  jobId: number | null;
};

type CandidatesListByStatus = {
  id: number;
  candidate: CandidateProfileDetails;
  jobPostId: number;
  status: string;
  candidateId: number;
  hasInterviewInvitation: boolean;
  interviewDetails: {
    id: number;
    meeting_link: string;
    meeting_date: string;
    meeting_status: string;
  };
  documents: UploadedDocResp[];
};

interface CandidatesListByStatusResp {
  resp: {
    meta: any;
    data: CandidatesListByStatus[];
  };
  status: number;
}

type InterviewFormData = {
  meetingLink: string;
  meetingDate: string;
};

type CreateInterviewResp = {
  resp: CreateInterview;
  status: number;
};
type CreateInterview = {
  success: boolean;
  message: string;
};

type ForgetPasswordState = {
  email: string;
};

type ForgetPasswordResp = {
  resp: ForgetPassword;
  status: number;
};
type ForgetPassword = {
  message: string;
  success: boolean;
};

type LoadingAndUimessage = {
  loading: boolean;
  uiMessage: string;
  success: boolean;
};

type ResetPasswordResp = {
  resp: ResetPassword;
  status: number;
};
type ResetPassword = {
  success: boolean;
  message: string;
};

type VNINVerificationTokenResp = {
  resp: VNINVerificationTokenRespData;
  status: number;
};

type VNINVerificationTokenRespData = {
  data: {
    auth_token: null | string;
    access_tokenexpire: string;
    message: string;
    success: boolean;
  };
};

type InterviewRescheduleResp = {
  resp: InterviewResponse;
  status: number;
};
type InterviewResponse = {
  candidateId: number;
  companyId: number;
  createdAt: string;
  id: number;
  jobId: number;
  meetingDate: string;
  meetingLink: string;
  meetingStatus: string;
  meetingTitle: string;
  rescheduleRequestedDate: string;
  rescheduleStatus: string;
  updatedAt: string;
};

type VNINVerificationResp = {
  resp: VNINVerificationResponse;
  status: number;
};

type VNINVerificationResponse = {
  success: boolean;
  data: VNINVerificationResponseData;
};

type VNINVerificationResponseData = {
  firstName: string;
  surname: string;
  middleName: string;
  dateOfBirth: string;
  userid: string;
  gender: string;
  trustedNumber: string;
  txid: string;
  ts: string;
  vNIN: string;
  agentID: string;
  photo: string;
};

type Rating = {
  avgRating: number;
  meta: Meta;
  data: CompanyRating[];
};

type CompanyRating = {
  id: number;
  rating: number;
  review: string;
  companyId: number;
  candidateId: number;
  createdAt: string;
  updatedAt: string;
  candidate: CandidateProfileDetails;
};

type ConversationResp = {
  meta: any;
  data: Conversation[];
};

type CreateConversationResp = {
  status: number;
  data: CreateConversation;
};
type CreateConversation = {
  id?: number;
  primaryUserId?: number;
  secondaryUserId?: number;
  updatedAt?: string;
  createdAt?: string;
  error?: string;
  success?: boolean;
};
type Conversation = {
  id: number;
  primaryUserId: number;
  secondaryUserId: number;
  updatedAt: string;
  createdAt: string;
  lastMessage: {
    id: number;
    conversationId: number;
    senderId: number;
    content: string;
    createdAt: string;
    updatedAt: string;
  };
  oppositeUser: {
    id?: string;
    name: string;
    email: string;
    candidate?: {
      profilePictureUrl: string;
    };
    company?: {
      profilePictureUrl: string;
    };
  };
  isActiveUser: boolean;
};

type MessageResp = {
  meta: any;
  data: Message[];
};

type Message = {
  id: number;
  conversationId: number;
  userId: number;
  content: string;
  senderId: number;
  createdAt: string;
  updatedAt: string;
  sender: {
    id: string;
    name: string;
    email: string;
    candidate?: {
      profilePictureUrl: string;
    };
    company?: {
      profilePictureUrl: string;
    };
  };
};

type sendMessage = {
  message: string;
};

type DashboardHeaderProfile = {
  picture: string;
  name: string;
};

type ScheduleInterviewData = {
  meetingLink: string;
  meetingDate: string;
  attendees: Attendees[];
};

type Attendees = {
  email: string;
};

type ChangePasswordFormType = {
  oldPassword: string;
  newPassword: string;
  confirmPassword: string;
};

type ChangePasswordFormResp = {
  resp: ChangePasswordResp;
  status: number;
};

type ChangePasswordResp = {
  message: string;
  success: boolean;
};

interface UpdateInterviewMeetingStatusResp {
  resp: InterviewResponse;
  status: number;
}

interface SubscriptionResponse {
  has_active_subscription: boolean;
  expiry_date: string | null;
}

interface SubscriptionHistoryResponse {
  id: number;
}
