export interface User {
  id: string;
  email: string;
  name: string;
  role: string;
  avatar?: string;
  createdAt: string;
  updatedAt: string;
}

export interface AuthContextType {
  user: User | null;
  login: (token: string, user: User) => void;
  register: (email: string, password: string, name: string) => Promise<void>;
  logout: () => void;
  isAuthenticated: boolean;
  isLoading: boolean;
  error: string | null;
}

export interface ClubInfo {
  id: string;
  name: string;
  type: string;
  logoUrl?: string;
  teams?: Team[];
}

export interface Team {
  id: string;
  name: string;
  category: string;
  logoUrl?: string;
}

export interface Match {
  id: string;
  competitionName: string;
  competitionId: string;
  date_time: string;
  home: string;
  home_id: string;
  home_logo_url: string;
  away: string;
  away_id: string;
  away_logo_url: string;
  score: string;
  venue: string;
  match_id: string;
  report_url: string;
  home_team?: string;
  away_team?: string;
  result_home?: number;
  result_away?: number;
  date?: string;
}

export interface Article {
  id: string;
  title: string;
  slug: string;
  excerpt: string;
  content: string;
  imageUrl?: string;
  author: {
    id: string;
    name: string;
    avatar?: string;
  };
  category?: string;
  isPublished: boolean;
  publishedAt?: string;
  createdAt: string;
  updatedAt: string;
}

export interface Sponsor {
  id: string;
  name: string;
  websiteUrl: string;
  logoUrl: string;
  isActive: boolean;
}

export interface ContactInfo {
  address?: string;
  phone?: string;
  email?: string;
  website?: string;
  workingHours?: string;
}

export interface Settings {
  id: string;
  clubId: string;
  clubType: string;
  primaryColor?: string; // For direct access to primary color
  theme: {
    primaryColor: string;
    secondaryColor: string;
    fontFamily: string;
  };
  socialLinks: {
    facebook?: string;
    instagram?: string;
    youtube?: string;
    website?: string;
  };
  contactInfo?: ContactInfo; // For contact information
  features: {
    darkMode: boolean;
    notifications: boolean;
    analytics: boolean;
  };
  createdAt: string;
  updatedAt: string;
}
