export const LEAD_STATUSES = [
  'NEW',
  'CONTACTED',
  'QUALIFIED',
  'PROPOSAL',
  'WON',
  'LOST',
] as const;

export const LEAD_SOURCES = [
  'WEBSITE',
  'REFERRAL',
  'COLD_CALL',
  'COLD_EMAIL',
  'SOCIAL_MEDIA',
  'OTHER',
] as const;

export type LeadStatus = (typeof LEAD_STATUSES)[number];
export type LeadSource = (typeof LEAD_SOURCES)[number];

export type LeadResponse = {
  id: string;
  firstName: string;
  lastName: string | null;
  email: string | null;
  phone: string | null;
  jobTitle: string | null;
  status: LeadStatus;
  source: LeadSource;
  notes: string | null;
  createdById: string;
  assignedToId: string;
  companyId: string | null;
  createdAt: Date;
  updatedAt: Date;
};

export type PaginatedLeadsResponse = {
  data: LeadResponse[];
  meta: {
    total: number;
    page: number;
    limit: number;
    totalPages: number;
  };
};

export type LeadAssigneeCount = {
  userId: string;
  count: number;
};

export type LeadAssigneeSummaryResponse = {
  total: number;
  assignees: LeadAssigneeCount[];
};
