export type ActionStepKind =
  | 'WATCH_VIDEO'
  | 'SUBMIT_INFLUENCE'
  | 'SIGN_PETITION'
  | 'RSVP_EVENT'
  | 'SIGNUP_SHIFT'
  | 'JOIN_CHALLENGE'
  | 'VISIT_LINK'
  | 'CUSTOM';

export interface DashboardProfile {
  id: string;
  email: string;
  name: string | null;
  avatar: string | null;
  role: string;
}

export interface DashboardReferral {
  code: string;
  link: string;
  totalReferrals: number;
}

export interface DashboardActionStep {
  id: string;
  order: number;
  kind: ActionStepKind;
  label: string;
  description: string | null;
  targetId: string | null;
  targetUrl: string | null;
  autoComplete: boolean;
  completed: boolean;
  completedAt: string | null;
  source: 'AUTO' | 'SELF_REPORTED' | null;
}

export interface DashboardActionCampaign {
  id: string;
  slug: string;
  title: string;
  description: string | null;
  rewardText: string | null;
  isActive: boolean;
  startsAt: string | null;
  endsAt: string | null;
  minStepsForReward: number | null;
  totalSteps: number;
  completedSteps: number;
  rewardEarned: boolean;
  steps: DashboardActionStep[];
}

export interface DashboardFeaturedEvent {
  slug: string;
  title: string;
  date: string;
  startTime: string;
  venueName: string | null;
  coverImageUrl: string | null;
  ticketsSold: number;
  maxAttendees: number | null;
}

export interface DashboardTraining {
  id: string;
  title: string;
  date: string;
  startTime: string;
  endTime: string;
  location: string | null;
  currentVolunteers: number;
  maxVolunteers: number;
  isSignedUp: boolean;
}

export interface DashboardMyEvent {
  ticketId: string;
  eventSlug: string;
  eventTitle: string;
  eventDate: string;
  status: string;
  tierName: string | null;
}

export interface DashboardPoints {
  total: number;
  achievementCount: number;
}

export interface DashboardResource {
  id: string;
  kind: 'document' | 'video' | 'photo';
  title: string;
  thumbnailUrl: string | null;
  downloadPath: string | null;
  viewPath: string | null;
}

export interface VolunteerDashboardResponse {
  profile: DashboardProfile;
  referral: DashboardReferral;
  actionCampaign: DashboardActionCampaign | null;
  featuredEvent: DashboardFeaturedEvent | null;
  trainings: DashboardTraining[];
  myEvents: DashboardMyEvent[];
  points: DashboardPoints;
  resources: DashboardResource[];
}
