export interface User {
  id: string;
  externalSubjectId: string;
  displayName: string;
  email: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface UserClaims {
  email: string;
  displayName: string;
}

export interface UserPreference {
  userId: string;
  preferredPace: string | null;
  preferredBudgetLevel: string | null;
  maxWalkingDistanceKm: number | null;
  preferredStartTime: string | null;
  childFriendlyPreferred: boolean;
  interests: string[];
  notes: string | null;
}

export interface UpdateUserPreferenceDto {
  preferredPace?: string | null;
  preferredBudgetLevel?: string | null;
  maxWalkingDistanceKm?: number | null;
  preferredStartTime?: string | null;
  childFriendlyPreferred?: boolean;
  interests?: string[];
  notes?: string | null;
}

/** Fully-resolved preference fields (no optional/undefined members) ready to persist. */
export type UserPreferenceFields = Omit<UserPreference, 'userId'>;

export const DEFAULT_USER_PREFERENCE: Omit<UserPreference, 'userId'> = {
  preferredPace: null,
  preferredBudgetLevel: null,
  maxWalkingDistanceKm: null,
  preferredStartTime: null,
  childFriendlyPreferred: false,
  interests: [],
  notes: null,
};
