/**
 * Having Survey types in types.ts was confusing tsc
 * and generating an invalid module.d.ts
 * See https://github.com/PostHog/posthog-js/issues/698
 */
export interface SurveyAppearance {
    backgroundColor?: string;
    submitButtonColor?: string;
    textColor?: string;
    submitButtonText?: string;
    descriptionTextColor?: string;
    ratingButtonColor?: string;
    ratingButtonActiveColor?: string;
    ratingButtonHoverColor?: string;
    whiteLabel?: boolean;
    autoDisappear?: boolean;
    displayThankYouMessage?: boolean;
    thankYouMessageHeader?: string;
    thankYouMessageDescription?: string;
    borderColor?: string;
    position?: 'left' | 'right' | 'center';
    placeholder?: string;
    widgetType?: 'button' | 'tab' | 'selector';
    widgetSelector?: string;
    widgetLabel?: string;
    widgetColor?: string;
    maxWidth?: string;
    zIndex?: string;
    shuffleQuestions?: boolean;
}
export declare enum SurveyType {
    Popover = "popover",
    API = "api",
    Widget = "widget"
}
export type SurveyQuestion = BasicSurveyQuestion | LinkSurveyQuestion | RatingSurveyQuestion | MultipleSurveyQuestion;
interface SurveyQuestionBase {
    question: string;
    description?: string | null;
    optional?: boolean;
    buttonText?: string;
    originalQuestionIndex: number;
}
export interface BasicSurveyQuestion extends SurveyQuestionBase {
    type: SurveyQuestionType.Open;
}
export interface LinkSurveyQuestion extends SurveyQuestionBase {
    type: SurveyQuestionType.Link;
    link?: string | null;
}
export interface RatingSurveyQuestion extends SurveyQuestionBase {
    type: SurveyQuestionType.Rating;
    display: 'number' | 'emoji';
    scale: number;
    lowerBoundLabel: string;
    upperBoundLabel: string;
}
export interface MultipleSurveyQuestion extends SurveyQuestionBase {
    type: SurveyQuestionType.SingleChoice | SurveyQuestionType.MultipleChoice;
    choices: string[];
    hasOpenChoice?: boolean;
    shuffleOptions?: boolean;
}
export declare enum SurveyQuestionType {
    Open = "open",
    MultipleChoice = "multiple_choice",
    SingleChoice = "single_choice",
    Rating = "rating",
    Link = "link"
}
export interface SurveyResponse {
    surveys: Survey[];
}
export type SurveyCallback = (surveys: Survey[]) => void;
export type SurveyUrlMatchType = 'regex' | 'exact' | 'icontains';
export interface Survey {
    id: string;
    name: string;
    description: string;
    type: SurveyType;
    linked_flag_key: string | null;
    targeting_flag_key: string | null;
    internal_targeting_flag_key: string | null;
    questions: SurveyQuestion[];
    appearance: SurveyAppearance | null;
    conditions: {
        url?: string;
        selector?: string;
        seenSurveyWaitPeriodInDays?: number;
        urlMatchType?: SurveyUrlMatchType;
        events: {
            values: {
                name: string;
            }[];
        } | null;
    } | null;
    start_date: string | null;
    end_date: string | null;
}
export {};
