import { FontAwesome, FontAwesome5, MaterialCommunityIcons } from '@expo/vector-icons'; export type ProgramActivity = { time: string; title: string; description: string; iconSet: 'FontAwesome' | 'FontAwesome5' | 'MaterialCommunityIcons'; iconName: React.ComponentProps['name'] | React.ComponentProps['name'] | React.ComponentProps['name']; transport?: string; }; export type ProgramActivities = { [date: string]: ProgramActivity[]; }; const PROGRAMS_URL = 'http://kepilhyzmat.com/assets/programs.json'; export const getPrograms = async (): Promise => { try { const response = await fetch(PROGRAMS_URL); if (!response.ok) { throw new Error(`Request failed with status ${response.status}`); } const data: ProgramActivities = await response.json(); return data; } catch (error) { console.error('Failed to fetch programs:', error); throw error; } };