/**
 * A draft time slot for an event or learn-&-serve opportunity. Shared because
 * it's built by `features/events/components/EventTimeSlotModal.tsx`, held by
 * `store/timeSlotsStore.ts`, and consumed by `features/opportunities/components/LearnServeForm.tsx`.
 */
export interface TimeSlot {
  id: number;
  date: string;
  start_time: string;
  end_time: string;
  participants_needed: number;
  /*
   * The four `event_*` keys below are **client-only**. No resource emits them:
   * `EventTimeSlotResource` returns `event_id` and the three time fields and
   * nothing more, and `LearnServeTimeSlotResource` names its denormalised copy
   * `opportunity_start_date` and friends. These are written by
   * `useEventCreateTiming.ts` when it builds a *draft* slot, so the modal can
   * validate an edit against the parent event's range without refetching it,
   * and read back by that same hook. Reading them off an API response is
   * always `undefined`.
   */
  event_start_date?: string;
  event_end_date?: string;
  event_start_time?: string;
  event_end_time?: string;
  /** Client-only: false until the row has been persisted. */
  isSaved: boolean;
}
