import { Survey, SurveyQuestion, SurveyQuestionBranchingType, MultipleSurveyQuestion, SurveyAppearance, SurveyQuestionDescriptionContentType, SurveyMatchType } from '@posthog/core'; export type PropertyOperator = SurveyMatchType | 'gt' | 'lt'; export type PropertyFilters = { [propertyName: string]: { values: string[]; operator: PropertyOperator; }; }; export interface SurveyEventWithFilters { name: string; propertyFilters?: PropertyFilters; } export declare const isMatchingRegex: (value: string, pattern: string) => boolean; export declare const surveyValidationMap: Record boolean>; export declare function matchPropertyFilters(propertyFilters: PropertyFilters | undefined, eventProperties: Record | undefined): boolean; /** * Utility function to determine if a description should be rendered based on content type * Only renders text content, skips HTML content for React Native compatibility * Defaults to Text content type when not specified * @param description The description text * @param contentType The content type (text or html), defaults to Text if not provided * @returns True if the description should be rendered, false otherwise */ export declare function shouldRenderDescription(description?: string | null, contentType?: SurveyQuestionDescriptionContentType): boolean; export declare const defaultBackgroundColor: "#eeeded"; export declare const defaultDescriptionOpacity = 0.8; export declare const defaultRatingLabelOpacity = 0.7; export type SurveyAppearanceTheme = Omit, 'widgetSelector' | 'widgetType' | 'widgetColor' | 'widgetLabel' | 'shuffleQuestions' | 'textColor' | 'inputTextColor'> & { textColor?: string; inputTextColor?: string; }; export declare const defaultSurveyAppearance: SurveyAppearanceTheme; export declare const getDisplayOrderQuestions: (survey: Survey) => SurveyQuestion[]; export declare const hasEvents: (survey: Survey) => boolean; export declare const canActivateRepeatedly: (survey: Survey) => boolean; /** * Use the Fisher-yates algorithm to shuffle this array * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle */ export declare const getDisplayOrderChoices: (question: MultipleSurveyQuestion) => string[]; /** * Determines the next question to show based on the survey's branching logic * @param survey The survey object * @param currentQuestionIndex The current question index * @param response The user's response to the current question * @returns The index of the next question or SurveyQuestionBranchingType.End if the survey should end */ export declare function getNextSurveyStep(survey: Survey, currentQuestionIndex: number, response: string | string[] | number | null): number | typeof SurveyQuestionBranchingType.End; export declare function getContrastingTextColor(color: string): 'black' | 'white';