import { ICommandInfo } from './command'; export interface ITopics { [k: string]: INestedTopic; } export interface INestedTopic { description?: string; subtopics?: ITopics; commands?: { [k: string]: ICommandInfo; }; hidden?: boolean; } export interface ITopic extends INestedTopic { name: string; } export declare class TopicBase { subtopics: { [k: string]: Topic; }; commands: { [k: string]: ICommandInfo; }; findTopic(id: string): Topic | undefined; findCommand(id: string): ICommandInfo | undefined; } export declare class Topic extends TopicBase implements ITopic { name: string; description?: string; hidden: boolean; constructor(opts: ITopic); } export declare function topicsToArray(input: ITopic[] | ITopics | undefined): ITopic[]; export declare function topicsToArray(input: ITopics | undefined, base: string): ITopic[]; export declare function commandsToArray(input: ICommandInfo[] | { [k: string]: ICommandInfo; } | undefined): ICommandInfo[]; export declare function commandsToArray(input: { [k: string]: ICommandInfo; } | undefined, base: string): ICommandInfo[]; export declare class RootTopic extends TopicBase { subtopics: { [k: string]: Topic; }; commands: { [k: string]: ICommandInfo; }; allCommands: ICommandInfo[]; allTopics: Topic[]; findCommand(id: string): ICommandInfo | undefined; addTopics(topics: ITopic[] | { [k: string]: ITopic; } | undefined): void; addCommands(commands: ICommandInfo[] | undefined): void; private findOrCreateTopic(name); private mergeTopics(a, b); }