import * as react_jsx_runtime from 'react/jsx-runtime';
import { ChatKitOptions, Attachment, ChatKitReference, SendUserMessageParams, ChatKitTheme, ColorScheme } from '@xpert-ai/chatkit-types';
import * as class_variance_authority_types from 'class-variance-authority/types';
import * as React from 'react';
import { ReactNode } from 'react';
import { VariantProps } from 'class-variance-authority';
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import { Assistant } from '@xpert-ai/xpert-sdk';
import { Capability } from '@xpert-ai/chatkit-web-shared';

type ChatProps = {
    className?: string;
    title?: string;
    placeholder?: string;
    clientSecret?: string;
    options?: ChatKitOptions | null;
    isClientSecretInitializing?: boolean;
};
declare function Chat({ className, options, title, placeholder, clientSecret, isClientSecretInitializing, }: ChatProps): react_jsx_runtime.JSX.Element;

declare const buttonVariants: (props?: ({
    variant?: "secondary" | "outline" | "ghost" | "default" | "link" | "destructive" | null | undefined;
    size?: "sm" | "lg" | "xs" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;
type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
    asChild?: boolean;
};
declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;

type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;

declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;

declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;

type ChatkitAvatarData = {
    background?: string;
    emoji?: {
        colons?: string;
        id?: string;
        unified?: string;
    };
    url?: string;
    useNotoColor?: boolean;
};
type ChatkitAvatarProps = React.ComponentProps<typeof Avatar> & {
    avatar?: ChatkitAvatarData | null;
    fallback?: string;
    fallbackClassName?: string;
    imageClassName?: string;
    label: string;
};
declare function getAvatarFallback(label: string): string;
declare function normalizeChatkitAvatar(rawAvatar: unknown): ChatkitAvatarData | null;
declare function extractAssistantAvatar(assistant: Assistant): ChatkitAvatarData | null;
declare function ChatkitAvatar({ avatar, className, fallback, fallbackClassName, imageClassName, label, style, ...props }: ChatkitAvatarProps): react_jsx_runtime.JSX.Element;

declare const Badge: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
    variant?: "default" | "secondary" | "outline";
} & React.RefAttributes<HTMLSpanElement>>;

declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
declare const CardAction: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;

declare const Separator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
    orientation?: "horizontal" | "vertical";
} & React.RefAttributes<HTMLDivElement>>;

type TabsValue = string;
type TabsProps = React.HTMLAttributes<HTMLDivElement> & {
    defaultValue?: TabsValue;
    value?: TabsValue;
    onValueChange?: (value: TabsValue) => void;
};
declare function Tabs({ className, defaultValue, value, onValueChange, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
declare const TabsList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
declare const TabsTrigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
    value: TabsValue;
} & React.RefAttributes<HTMLButtonElement>>;
declare const TabsContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
    value: TabsValue;
} & React.RefAttributes<HTMLDivElement>>;

type ComposerValuePayload = {
    text?: string;
    reply?: string;
    attachments?: Attachment[];
    references?: ChatKitReference[];
    appendReferences?: boolean;
    selectedToolId?: string | null;
    selectedModelId?: string | null;
};

type CommandMessageMap = {
    onSendUserMessage: SendUserMessageParams;
    onSetComposerValue: ComposerValuePayload | null;
    onSetOptions: ChatKitOptions | null;
    onFocusComposer: null;
    onSetThreadId: {
        threadId: string | null;
    };
    onClientToolCall: unknown;
    onGetClientSecret: string | null;
    onWidgetAction: {
        action: string;
        widgetItem: unknown;
    };
};
type ParentMessenger = {
    isParentAvailable: boolean;
    sendCommand: <C extends keyof CommandMessageMap>(command: C, data?: CommandMessageMap[C], transfer?: Transferable[]) => Promise<unknown>;
    sendEvent: (event: 'public_event', data?: [Capability.Event, unknown], transfer?: Transferable[]) => void;
};
type ParentMessengerProviderProps = {
    children: ReactNode;
};
declare function ParentMessengerProvider({ children, }: ParentMessengerProviderProps): react_jsx_runtime.JSX.Element;

type ParentMessengerOptions = {
    onSetOptions?: (options: ChatKitOptions | null) => void;
    onSetComposerValue?: (payload: ComposerValuePayload | null) => void;
    onFocusComposer?: () => void;
};
declare function useParentMessenger({ onSetOptions, onSetComposerValue, onFocusComposer, }?: ParentMessengerOptions): ParentMessenger;

interface ThemeProviderProps {
    children: React.ReactNode;
    /**
     * Theme configuration. Accepts ChatKitTheme object or ColorScheme string for backward compatibility.
     * ColorScheme string will be normalized to ChatKitTheme object internally.
     * @preferred ChatKitTheme
     */
    theme?: ChatKitTheme | ColorScheme;
}
interface ThemeContextValue {
    /**
     * Normalized theme configuration as ChatKitTheme object.
     * ColorScheme strings are converted to ChatKitTheme for consistent access.
     */
    theme: ChatKitTheme;
    isDarkMode: boolean;
}
declare function useTheme(): ThemeContextValue;
/**
 * ThemeProvider applies theme configuration via CSS variables
 */
declare function ThemeProvider({ children, theme: themeProp }: ThemeProviderProps): react_jsx_runtime.JSX.Element;

declare const supportedLocales: readonly ["en-US", "zh-CN"];
type SupportedLocale = (typeof supportedLocales)[number];
declare function setLanguage(locale?: string | null): SupportedLocale;
declare function getLanguage(): SupportedLocale;

export { Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chat, type ChatProps, ChatkitAvatar, type ChatkitAvatarData, type ChatkitAvatarProps, Input, type ParentMessenger, ParentMessengerProvider, type ParentMessengerProviderProps, ScrollArea, ScrollBar, Separator, Tabs, TabsContent, TabsList, TabsTrigger, ThemeProvider, type ThemeProviderProps, supportedLocales as chatkitSupportedLocales, extractAssistantAvatar, getAvatarFallback, getLanguage as getChatkitLanguage, normalizeChatkitAvatar, setLanguage as setChatkitLanguage, useParentMessenger, useTheme };
