import type { Visibility } from "@/core/module-registry/types";

export type DeskId = "desk-1" | "desk-2" | "desk-3" | "desk-4";

export type DeskPosition =
  | "top-left"
  | "top-right"
  | "bottom-left"
  | "bottom-right";

export interface DeskDefinition {
  id: DeskId;
  label: string;
  position: DeskPosition;
}

export interface DeskReservation {
  id: string;
  deskId: DeskId;
  date: string; // YYYY-MM-DD
  userName: string;
  notes: string;
  visibility: Visibility;
  createdAt: string;
  updatedAt: string;
}

export const DESKS: DeskDefinition[] = [
  { id: "desk-1", label: "Birou 1", position: "top-left" },
  { id: "desk-2", label: "Birou 2", position: "top-right" },
  { id: "desk-3", label: "Birou 3", position: "bottom-left" },
  { id: "desk-4", label: "Birou 4", position: "bottom-right" },
];

export function getDeskLabel(deskId: DeskId): string {
  const desk = DESKS.find((d) => d.id === deskId);
  return desk?.label ?? deskId;
}
