/// <reference types="react" />
import type { PrismLib, PrismTheme } from 'prism-react-renderer';
import type { ChatMode as ChatModeAPIType } from '../__generated__/graphql';
import type { BreadcrumbRules } from '../hooks/useBreadcrumbs';
import type { StringReplacementRule } from '../utils/processStringReplacement';
import type { FormConfig, SubmitCallback } from './Form/types';
import type { CustomIcon } from './Icons/BuiltInIconRenderer';
import type { CustomIcons } from './InkeepCustomIconTypes';
import type { InkeepCallbackEvent, UserType } from './InkeepEventTypes';
import type { ColorMode, SyntaxHighlighterTheme, UserTheme } from './InkeepThemeTypes';
import type { CustomCardSettings } from './SearchResults/TabConfiguration';
import type { Workflow } from './Workflows/InkeepWorkflowTypes';
export type { CustomCardSettings, FormConfig, InkeepCallbackEvent, PrismTheme, SubmitCallback, SyntaxHighlighterTheme, Workflow, };
export interface InkeepEmbeddedChatProps extends InkeepEmbeddedChatCoreProps {
}
export interface InkeepCustomTriggerProps extends InkeepCustomTriggerCoreProps {
}
export interface InkeepSearchBarProps extends InkeepSearchBarCoreProps {
}
export interface InkeepChatButtonProps extends InkeepChatButtonCoreProps {
}
export interface InkeepEmbeddedChatCoreProps {
    shouldAutoFocusInput?: boolean;
    isHidden?: boolean;
    baseSettings: InkeepBaseSettings;
    aiChatSettings?: InkeepAIChatSettings;
}
export interface InkeepCustomTriggerSettings {
    isOpen: boolean;
    onClose: () => void;
    onOpen?: () => void;
}
export type InkeepCustomTriggerCoreProps = InkeepCustomTriggerSettings & {
    baseSettings: InkeepBaseSettings;
    modalSettings?: InkeepModalSettings;
    searchSettings?: InkeepSearchSettings;
    aiChatSettings?: InkeepAIChatSettings;
};
export interface InkeepSearchBarCoreProps {
    baseSettings: InkeepBaseSettings;
    modalSettings?: InkeepModalSettings;
    searchSettings?: InkeepSearchSettings;
    aiChatSettings?: InkeepAIChatSettings;
}
export interface InkeepChatButtonCoreProps {
    chatButtonType?: ChatButtonTypes;
    isPositionFixed?: boolean;
    fixedPositionXOffset?: string;
    fixedPositionYOffset?: string;
    chatButtonBgColor?: string;
    chatButtonBgColorDarkMode?: string;
    chatButtonText?: string;
    baseSettings: InkeepBaseSettings;
    modalSettings?: InkeepModalSettings;
    searchSettings?: InkeepSearchSettings;
    aiChatSettings?: InkeepAIChatSettings;
}
export interface InkeepBaseSettings {
    apiKey?: string;
    integrationId: string;
    organizationId: string;
    organizationDisplayName?: string;
    primaryBrandColor: string;
    colorMode?: ColorMode;
    theme?: UserTheme;
    customIcons?: CustomIcons;
    userId?: string;
    userEmail?: string;
    userName?: string;
    userCohorts?: string[];
    userToken?: string;
    userType?: UserType;
    filters?: SearchAndChatAttributeFilters;
    logEventCallback?: (event: InkeepCallbackEvent) => void;
    optOutAnalyticalCookies?: boolean;
    optOutAllAnalytics?: boolean;
    optOutFunctionalCookies?: boolean;
    remoteErrorLogsLevel?: RemoteErrorLogsLevel;
    consoleDebugLevel?: ConsoleDebugLevel;
    chatApiProxyDomain?: string;
    analyticsApiProxyDomain?: string;
    breadcrumbRules?: BreadcrumbRules;
    customCardSettings?: CustomCardSettings[];
    stringReplacementRules?: StringReplacementRule[];
    env?: 'DEVELOPMENT' | 'PRODUCTION';
    shadowHost?: HTMLElement | null;
    rootElement?: HTMLElement | null;
    tags?: string[];
    prism?: PrismLib;
    appendQueryParamsToUrls?: UrlQueryParam;
}
export type UrlQueryParam = Record<string, string>;
type QueryValue = boolean | number | string;
type QueryCondition = {
    $eq: QueryValue;
} | {
    $in: (number | string)[];
};
type FilterQuery = Record<string, QueryCondition | QueryValue | QueryValue[]> | {
    $and: FilterQuery[];
} | {
    $or: FilterQuery[];
};
export interface SearchAndChatAttributeFilters {
    attributes?: FilterQuery;
    product?: string;
    productVersion?: string;
}
/**
 * Debugging levels:
 * 0 - None: No debugging information is logged.
 * 1 - Errors: Log errors, events, and exceptions.
 * 2 - Messages: Log messages in addition to errors, events, and exceptions.
 * 3 - Verbose: Log verbose information, including an error trace for every console.log.
 */
export declare enum ConsoleDebugLevel {
    None = 0,
    Errors = 1,
    Messages = 2,
    Verbose = 3
}
/**
 * Remote error capture levels, which is sent to the Inkeep team for debugging and service monitoring purposes.
 * 0 - None: No remote error logging is performed.
 * 1 - AnonymousErrors: Capture errors, events, and exceptions without identifiable user information.
 * 2 - IdentifiableErrors: Capture errors, events, exceptions and logs that can contain identifiable user information.
 * 3 - ExtensiveTroubleShooting:  Capture errors, events, exceptions and logs that can contain identifiable user information as well as extensive details on UX interactions and other session information.
 */
export declare enum RemoteErrorLogsLevel {
    None = 0,
    AnonymousErrors = 1,
    IdentifiableErrors = 2,
    ExtensiveTroubleShooting = 3
}
export type InkeepRecordType = 'DISCOURSE' | 'DOCUMENTATION' | 'GITHUB_ISSUE' | 'STACKOVERFLOW';
export interface InkeepAIChatSettings {
    placeholder?: string;
    introMessage?: string;
    chatSubjectName?: string;
    botName?: string;
    botAvatarSrcUrl?: string;
    botAvatarDarkSrcUrl?: string;
    userAvatarSrcUrl?: string;
    shouldOpenLinksInNewTab?: boolean;
    quickQuestionsLabel?: string;
    quickQuestions?: string[];
    shouldHighlightFirstQuickQuestion?: boolean;
    isChatSharingEnabled?: boolean;
    shareChatUrlBasePath?: string;
    chatId?: string;
    isViewOnly?: boolean;
    shouldScrollToBottomOnLoad?: boolean;
    alignMessagesToTop?: boolean;
    defaultChatMode?: ChatMode;
    toggleButtonSettings?: AIChatToggleButtonSettings;
    disclaimerSettings?: AIChatDisclaimerSettings;
    isControlledMessage?: boolean;
    handleMessageChange?: (query: string) => void;
    chatFunctionsRef?: React.Ref<AIChatFunctions>;
    includeAIAnnotations?: IncludeAIAnnotations;
    aiAnnotationPolicies?: AIAnnotationPolicies;
    getHelpCallToActions?: GetHelpCallToAction[];
    messageAttributes?: JSONScalar;
    context?: string;
    guidance?: string;
    workflowsHeader?: string;
    workflows?: Workflow[];
    actionButtonLabels?: AIChatActionButtonLabels;
}
interface JSONScalar {
    [key: string]: JSONScalar[] | Record<string, JSONScalar> | boolean | number | string | null;
}
export interface AIChatToggleButtonSettings {
    isChatModeToggleEnabled?: boolean;
    chatModeToggleValue?: ChatMode;
    chatModeToggleLabel?: string;
    chatModeToggleTooltip?: string;
}
export interface AIChatDisclaimerSettings {
    isDisclaimerEnabled?: boolean;
    disclaimerLabel?: string;
    disclaimerTooltip?: string;
}
export type ChatMode = `${ChatModeAPIType}`;
export interface AIChatFunctions {
    submitCurrentInputMessage: () => void;
    updateInputMessage: (message: string) => void;
    submitNewMessage: (message: string) => void;
    clearChat: () => void;
    openForm: (formConfig: FormConfig) => void;
}
export declare const chatMethods: (keyof AIChatFunctions)[];
export interface BaseGetHelpCallToAction {
    icon: CustomIcon;
    name: string;
}
export type GetHelpCallToActionOpenUrl = BaseGetHelpCallToAction & {
    type?: 'OPEN_LINK';
    url: string;
};
export interface OpenFormAction {
    type: 'OPEN_FORM';
    formConfig: FormConfig;
}
export interface InvokeCallbackAction {
    type: 'INVOKE_CALLBACK';
    callback: () => void;
    shouldCloseModal?: boolean;
}
export type GetHelpCallToActionInvokeCallback = BaseGetHelpCallToAction & InvokeCallbackAction;
export type GetHelpCallToActionOpenForm = BaseGetHelpCallToAction & OpenFormAction;
export type GetHelpCallToAction = GetHelpCallToActionInvokeCallback | GetHelpCallToActionOpenForm | GetHelpCallToActionOpenUrl;
export interface AIChatActionButtonLabels {
    clearButtonLabel?: string;
    shareButtonLabel?: string;
    getHelpButtonLabel?: string;
    stopButtonLabel?: string;
}
export interface IncludeAIAnnotations {
    shouldEscalateToSupport: boolean;
}
interface AIAnnotationPolicies {
    shouldEscalateToSupport?: ShouldEscalateToSupportPolicy[];
}
interface ShouldEscalateToSupportPolicy {
    threshold: 'STANDARD' | 'STRICT';
    action: ShowEscalateToSupportButtonAction;
}
export interface ShowEscalateToSupportButtonAction {
    type: 'SHOW_SUPPORT_BUTTON';
    label?: string;
    icon?: CustomIcon;
    action: InvokeCallbackAction | OpenFormAction;
}
export interface InkeepSearchSettings {
    placeholder?: string;
    prefilledQuery?: string;
    shouldOpenLinksInNewTab?: boolean;
    searchFunctionsRef?: React.Ref<SearchFunctions>;
    handleSearchQueryChange?: (query: string) => void;
    isControlledSearchQuery?: boolean;
    tabSettings?: InkeepTabSettings;
    maximumHitsLimit?: number;
    debounceTime?: number;
    shouldShowAskAICard?: boolean;
}
export interface InkeepTabSettings {
    isAllTabEnabled?: boolean;
    rootBreadcrumbsToUseAsTabs?: string[];
    tabOrderByLabel?: string[];
    disabledDefaultTabs?: string[];
    alwaysDisplayedTabs?: string[];
}
export type SearchViewTypes = 'SINGLE_PANE_NO_SPACE' | 'SINGLE_PANE_SPACED' | 'TWO_PANE';
export interface SearchFunctions {
    updateSearchQuery: (query: string) => void;
}
export interface InkeepModalSettings {
    defaultView?: ModalViewTypes;
    isModeSwitchingEnabled?: boolean;
    isShortcutKeyEnabled?: boolean;
    openShortcutKey?: string;
    onShortcutKeyPressed?: () => void;
    isAlignedToTop?: boolean;
    isAlignedToRight?: boolean;
    closeOnBlur?: boolean;
    askAILabel?: string;
    switchToSearchMessage?: string;
}
export interface InkeepChatButtonSettings {
    chatButtonType?: ChatButtonTypes;
    chatButtonText?: string;
    isPositionFixed?: boolean;
    fixedPositionXOffset?: string;
    fixedPositionYOffset?: string;
    chatButtonBgColor?: string;
    chatButtonBgColorDarkMode?: string;
}
export type ModalViewTypes = 'AI_CHAT' | 'SEARCH';
export type ModalPageTypes = 'aiChat' | 'searchResults';
export type ChatButtonTypes = 'ICON' | 'PILL' | 'RECTANGLE_SHORTCUT';
export declare const defaultInkeepBaseSettings: Partial<InkeepBaseSettings>;
export declare const defaultInkeepAIChatSettings: Partial<InkeepAIChatSettings>;
export declare const defaultInkeepSearchSettings: Partial<InkeepSearchSettings>;
export declare const defaultModalSettings: Partial<InkeepModalSettings>;
export declare const defaultChatButtonModalProps: Partial<InkeepChatButtonCoreProps>;
export declare const defaultSearchBarModalProps: Partial<InkeepSearchBarCoreProps>;
