import { Field, IDataHook } from "model-react"; import { LaunchMenu } from "../LaunchMenu"; import { LMSession } from "./LMSession"; /** * A class to manage the sessions for a LM instance */ export declare class SessionManager { protected LM: LaunchMenu; protected sessions: Field; /** * Creates a new session manager for the given LM instance * @param LM The LM instance to create a manager for */ constructor(LM: LaunchMenu); /** * Disposes of all data in this session manager (destroying sessions) */ destroy(): void; /** * Retrieves the sessions that are currently open * @param hook The hook to subscribe to changes * @returns The sessions that are currently open */ getSessions(hook?: IDataHook): LMSession[]; /** * Retrieves the session that is currently selected (the session in the last position) * @param hook The hook to subscribe to changes * @returns The current top session */ getSelectedSession(hook?: IDataHook): LMSession | null; /** * Either adds or creates and adds a session * @param session The session to be added * @returns The created and added session */ addSession(session?: LMSession): LMSession; /** * Removes the given session * @param session The session to be removed */ removeSession(session: LMSession): void; /** * Selects the given session to be displayed * @param session The session to be displayed */ selectSession(session: LMSession): void; } //# sourceMappingURL=SessionManager.d.ts.map