mod home;
mod news;

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_opener::init())
        // Registriert den Nostr-State
        .manage(news::NewsState::default())
        .invoke_handler(tauri::generate_handler![
            home::fetch_nostr_posts,
            news::save_openrouter_key,
            news::load_rss_config,
            news::save_rss_urls, // Geändert von save_rss_url zu save_rss_urls
            news::fetch_ai_news,
            news::fetch_rss_news,
            news::save_groq_key,
        ])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
