import { invoke } from "@tauri-apps/api/core"; import type { Profile, ProfileSummary } from "@/types/profile"; /** Thin typed wrapper around the `profile_manager` Tauri commands. */ export const profileService = { list: () => invoke("list_profiles"), load: (id: string) => invoke("load_profile", { id }), save: (profile: Profile) => invoke("save_profile", { profile }), create: (name: string) => invoke("create_profile", { name }), rename: (id: string, newName: string) => invoke("rename_profile", { id, newName }), duplicate: (id: string, newName: string) => invoke("duplicate_profile", { id, newName }), remove: (id: string) => invoke("delete_profile", { id }), reset: (id: string) => invoke("reset_profile", { id }), exportTo: (id: string, destination: string) => invoke("export_profile", { id, destination }), importFrom: (source: string) => invoke("import_profile", { source }), directory: () => invoke("profiles_directory"), };