import type { System } from "@/api/systems";

export type TaskStatus = "todo" | "in_progress" | "done" | "cancelled";
export type TaskPriority = "none" | "low" | "medium" | "high";
export type TaskKind = "work" | "plan" | "issue";
export type NoteType = "note" | "process" | "snippet";

export interface Note {
  id: number;
  title: string;
  body: string;
  description: string | null;
  tags: string[];
  parent_id: number | null;
  parent_title?: string | null;
  project_id: number | null;
  milestone_id: number | null;
  status: TaskStatus | null;
  priority: TaskPriority | null;
  due_date: string | null;
  started_at: string | null;
  completed_at: string | null;
  recurrence_rule: Record<string, unknown> | null;
  recurrence_next_spawn_at: string | null;
  is_task: boolean;
  note_type: NoteType;
  task_kind?: TaskKind;
  systems?: System[];
  arose_from_id?: number | null;
  created_at: string;
  updated_at: string;
}

export interface NoteListResponse {
  notes: Note[];
  total: number;
}
