export type DayStripItemKind = 'appointment' | 'unscheduled';

export type DayStripItem = {
  kind: DayStripItemKind;
  id: string;
  patientId: string;
  patientFirstName: string;
  patientLastName: string;
  patientIsWalkIn: boolean;
  colorCode: string;
  timeLabel: string | null;
  subtitle: string;
  canDelete?: boolean;
};

/** Unscheduled card banner: first line’s type only. Empty / missing type → no color. */
export function unscheduledStripColorCode(
  details: readonly { treatmentType?: string | null }[],
): string {
  return details[0]?.treatmentType?.trim() ?? '';
}
