export type UserRole = "owner" | "leader" | "employee";
export type DepartmentKey = "marketing" | "administracion" | "capital_humano" | "operaciones" | "proyectos";

export type DateRangeKey = "esta-semana" | "4-semanas" | "trimestre";

export type LocationOption = {
  id: string;
  name: string;
  shortName: string;
};

export type KPIItem = {
  label: string;
  value: string;
  delta?: string;
  positive?: boolean;
};

export type DepartmentHealth = {
  id: string;
  name: string;
  score: number;
  summary: string;
  metrics: KPIItem[];
};

export type AlertLevel = "riesgo" | "vencido";

export type AlertItem = {
  id: string;
  title: string;
  owner: string;
  timing: string;
  level: AlertLevel;
  locationId?: string;
};

export type LocationRow = {
  id: string;
  location: string;
  sales: string;
  margin: string;
  perfectDeliveries: string;
  turnover: string;
  status: "en_ruta" | "riesgo";
};

export type Meeting = {
  id: string;
  department: string;
  title: string;
  schedule: string;
  attendees: number;
  commitments: number;
  status: "proxima" | "completada";
  locationId: string;
};

export type Person = {
  id: string;
  name: string;
  roleTitle: string;
  department: string;
  initials: string;
  locationId: string;
  activeCommitments: number;
};

export type Initiative = {
  id: string;
  title: string;
  owner: string;
  dueDate: string;
  progress: number;
  status: "en_ruta" | "riesgo" | "vencido" | "completado";
  locationId: string;
};

export type SankeyNodeItem = {
  name: string;
  value: number;
  color: string;
};

export type SankeyLinkItem = {
  source: number;
  target: number;
  value: number;
};

export type SankeyDataset = {
  nodes: SankeyNodeItem[];
  links: SankeyLinkItem[];
};

export type FinancialDetail = {
  id: string;
  title: string;
  amount: string;
  percentage: string;
  breakdown: Array<{ label: string; value: string }>;
  trend: Array<{ week: string; value: number; label: string }>;
  notes: string;
};
