export interface StatusLevel {
  name: string;
  minPoints: number;
}

export const STATUS_LEVELS: StatusLevel[] = [
  { name: "Завтра точно начну", minPoints: 0 },
  { name: "Всё по плану (плана нет)", minPoints: 25 },
  { name: "Гений прокрастинации (но всё сделал)", minPoints: 50 },
  { name: "Хвостоуничтожитель 3000", minPoints: 75 },
  { name: "Легенда планирования", minPoints: 90 }
];

const POINTS_PER_TASK = 5;

export const calculatePoints = (completedTasks: number): number => {
  return Math.min(completedTasks * POINTS_PER_TASK, 100);
};

export const getCurrentStatus = (points: number): string => {
  const status = STATUS_LEVELS
    .slice()
    .reverse()
    .find(level => points >= level.minPoints);
  return status?.name || STATUS_LEVELS[0].name;
}; 