export type ViewKey =
  | "resources"
  | "projects"
  | "allocations"
  | "vacations"
  | "roles"
  | "users"
  | "blueprints";

export interface ColumnDef {
  key:            string;
  label:          string;
  defaultVisible: boolean;
  hideable:       boolean;
  sortable?:      boolean;
  width?:         number;
  isCustom?:      boolean;
  fieldType?:     string;
}

export interface ViewPreferences {
  visible: string[];
  /** Persisted column sort state. null / absent = no saved sort. */
  sort?: { field: string; dir: "asc" | "desc" };
  /** Persisted row order as array of row IDs. Empty = natural order. */
  rowOrder?: string[];
}

export type ColumnPreferences = Partial<Record<ViewKey, ViewPreferences>>;
