/** * Profiles Hook * * React hook for plugin profiles state management. * * @since v1.60.0 */ import { type ProfileDataProvider } from '../../core/profiles/index.js'; import type { ApplyProfileOptions, ApplyProfileResult, CreateProfileOptions, PluginProfile, ProfileDiff } from '../../core/profiles/profile-types.js'; /** * Hook return type */ export interface UseProfilesResult { /** All profiles */ profiles: PluginProfile[]; /** Number of profiles */ profileCount: number; /** Active profile */ activeProfile: PluginProfile | null; /** Get a profile by ID */ getProfile: (id: string) => PluginProfile | null; /** Get a profile by name */ getProfileByName: (name: string) => PluginProfile | null; /** Create a new profile */ createProfile: (options: CreateProfileOptions) => PluginProfile; /** Update a profile */ updateProfile: (id: string, updates: Partial>) => PluginProfile | null; /** Delete a profile */ deleteProfile: (id: string) => boolean; /** Clone a profile */ cloneProfile: (id: string, newName: string) => PluginProfile | null; /** Set active profile */ setActiveProfile: (id: string | null) => boolean; /** Check if profile is active */ isActiveProfile: (id: string) => boolean; /** Save current configuration to profile */ snapshotToProfile: (id: string) => boolean; /** Apply a profile (dry run) */ applyProfile: (id: string, options?: ApplyProfileOptions) => ApplyProfileResult; /** Compare two profiles */ compareProfiles: (profileAId: string, profileBId: string) => ProfileDiff | null; /** Compare profile with current */ compareWithCurrent: (profileId: string) => ProfileDiff | null; /** Export profile to JSON */ exportProfile: (id: string) => string | null; /** Import profile from JSON */ importProfile: (data: string) => PluginProfile | null; /** Search profiles */ searchProfiles: (query: string) => PluginProfile[]; /** Serialize for persistence */ serialize: () => string; } /** * Hook options */ export interface UseProfilesOptions { /** Initial serialized data to load */ initialData?: string; /** Data provider for current configuration */ provider?: ProfileDataProvider; } /** * React hook for managing plugin profiles */ export declare function useProfiles(options?: UseProfilesOptions): UseProfilesResult; //# sourceMappingURL=useProfiles.d.ts.map