#pragma once

#include <cstring>

#include "types.hpp"
#include "user.hpp"

struct task_t
{
  uint16 id;      // Auto-assigned (1–65535, 0 = empty slot)
  uint8 user_id;  // Owner (matches user_t.id)
  char title[64]; // Task description
  int64 due_date; // Unix timestamp (seconds)
  bool completed; // Done flag
  bool active;    // Slot in use
};

constexpr int MAX_TASKS = 32;
internal task_t g_Tasks[MAX_TASKS] = {};
internal uint16 g_NextTaskId = 1;
