export const API_BASE_URL = typeof window !== 'undefined' 
  ? window.location.origin + '/api' 
  : 'http://localhost:3005/api';

export const APP_NAME = 'Cat Tv';
export const APP_DESCRIPTION = 'TV en vivo, donde estés';
export const APP_VERSION = '1.0.0';

export const ROUTES = {
  HOME: '/home',
  LOGIN: '/login',
  TV: '/tv',
  MOVIES: '/movies',
  SERIES: '/series',
  SEARCH: '/search',
  FAVORITES: '/favorites',
  PROFILE: '/profile',
  ADMIN: '/admin',
  ADMIN_USERS: '/admin/users',
  ADMIN_CONTENT: '/admin/content',
  ADMIN_CHANNELS: '/admin/channels',
  ADMIN_STATS: '/admin/stats',
  SPEED_TEST: '/speed-test',
} as const;

export const PLAYBACK_SPEEDS = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2] as const;

export const QUALITIES = ['Auto', '360p', '480p', '720p', '1080p', '4K'] as const;

export const CHANNEL_CATEGORIES = [
  { id: 'all', name: 'Todos', slug: 'all' },
  { id: 'deportes', name: 'Deportes', slug: 'deportes' },
  { id: 'noticias', name: 'Noticias', slug: 'noticias' },
  { id: 'infantiles', name: 'Infantiles', slug: 'infantiles' },
  { id: 'peliculas', name: 'Películas', slug: 'peliculas' },
  { id: 'musica', name: 'Música', slug: 'musica' },
  { id: 'documentales', name: 'Documentales', slug: 'documentales' },
  { id: 'entretenimiento', name: 'Entretenimiento', slug: 'entretenimiento' },
  { id: 'educacion', name: 'Educación', slug: 'educacion' },
  { id: 'religiosos', name: 'Religiosos', slug: 'religiosos' },
] as const;

export const MOVIE_GENRES = [
  'Acción', 'Aventura', 'Animación', 'Comedia', 'Crimen', 'Documental',
  'Drama', 'Familia', 'Fantasía', 'Historia', 'Horror', 'Música',
  'Misterio', 'Romance', 'Ciencia Ficción', 'Thriller', 'Guerra', 'Western',
] as const;

export const USER_ROLES = [
  { value: 'admin', label: 'Administrador' },
  { value: 'moderator', label: 'Moderador' },
  { value: 'user', label: 'Usuario' },
] as const;

export const USER_STATUSES = [
  { value: 'active', label: 'Activo', color: 'success' },
  { value: 'suspended', label: 'Suspendido', color: 'warning' },
  { value: 'expired', label: 'Expirado', color: 'danger' },
] as const;

export const PLACEHOLDER_POSTER = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjQ1MCIgdmlld0JveD0iMCAwIDMwMCA0NTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSI0NTAiIGZpbGw9IiMxYTFhMmUiLz48dGV4dCB4PSI1MCUiIHk9IjUwJSIgZG9taW5hbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzY2NjY2NiIgZm9udC1mYW1pbHk9IkludGVyIiBmb250LXNpemU9IjE0Ij5TaW4gSW1hZ2VuPC90ZXh0Pjwvc3ZnPg==';

export const PLACEHOLDER_BACKDROP = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4MCIgaGVpZ2h0PSI3MjAiIHZpZXdCb3g9IjAgMCAxMjgwIDcyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTI4MCIgaGVpZ2h0PSI3MjAiIGZpbGw9IiMxYTFhMmUiLz48L3N2Zz4=';

export const CONTROLS_HIDE_DELAY = 3000; // ms
export const SEARCH_DEBOUNCE_DELAY = 400; // ms
export const TOAST_DURATION = 4000; // ms
export const TOKEN_REFRESH_INTERVAL = 14 * 60 * 1000; // 14 minutes
