import { ChatContextItem } from './types'; export interface Question { prompt: string; title?: string; context?: ChatContextItem[]; } export interface QuestionRegistration { id: string; urlPattern: string | RegExp; questions: Question[]; } /** * Registers questions for specific pages based on URL patterns. * Returns a setter function to update the questions dynamically, similar to useState. * * Multiple registrations with the same URL pattern are allowed and will all be merged * when the pattern matches. Each call creates a new independent registration. * * @param urlPattern - URL pattern (string or RegExp) to match against page URLs * @param initialQuestions - Initial array of questions to provide when the pattern matches * @returns A setter function to update the questions, with an unregister method attached */ export declare function provideQuestions(urlPattern: string | RegExp, initialQuestions: Question[]): ((questions: Question[]) => void) & { unregister: () => void; }; /** * React hook for providing questions that automatically cleans up on unmount. * This is the recommended way to use questions in React components. * * @param urlPattern - URL pattern (string or RegExp) to match against page URLs * @param initialQuestions - Initial array of questions to provide when the pattern matches * @returns A setter function to update the questions */ export declare function useProvideQuestions(urlPattern: string | RegExp, initialQuestions?: Question[]): (questions: Question[]) => void; /** * React hook to get all questions that match the current URL. * This filters the page context to only return question-type items. * * @returns Array of questions from all matching registrations */ export declare function useQuestions(): Question[]; //# sourceMappingURL=questions.d.ts.map