mod commands;
mod types;
mod wsl_bridge;

use commands::*;
use wsl_bridge::create_shared_bridge;

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    let bridge = create_shared_bridge();

    tauri::Builder::default()
        .plugin(tauri_plugin_dialog::init())
        .plugin(tauri_plugin_opener::init())
        .plugin(tauri_plugin_shell::init())
        .manage(bridge)
        .invoke_handler(tauri::generate_handler![
            start_claude,
            stop_claude,
            send_prompt,
            is_claude_running,
            get_working_directory,
            select_wsl_directory,
        ])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
