import type { ComponentType, ReactNode } from "react";
import type { ChatAttachment } from "./attachment";
import type { ChatVoiceConfig } from "./voice";
export type DeepPartial<T> = {
    [K in keyof T]?: T[K] extends (...args: never[]) => unknown ? T[K] : T[K] extends Array<infer U> ? Array<DeepPartial<U>> : T[K] extends object ? DeepPartial<T[K]> : T[K];
};
export type ChatInputMode = "text" | "voice";
export type ChatInputStatus = "idle" | "typing" | "voice-mode-ready" | "recording" | "transcribing" | "transcript-ready" | "attachment-selected" | "sending" | "error";
export type ChatInputColorTokens = {
    brandPrimary: string;
    surfaceInputDefault: string;
    surfaceInputFocus: string;
    surfaceInputRecording: string;
    surfaceInputError: string;
    textPrimary: string;
    textSecondary: string;
    iconDefault: string;
    iconActive: string;
    actionSendDefault: string;
    actionSendDisabled: string;
    actionSendTextOnPrimary: string;
    borderDefault: string;
    borderFocus: string;
    borderError: string;
    statusError: string;
    statusWarning: string;
    statusSuccess: string;
    voiceWaveformActive: string;
    voiceWaveformBackground: string;
};
export type ChatInputSpacingTokens = {
    inputOuter: number;
    inputInner: number;
    actionGap: number;
    attachmentGap: number;
    voiceWaveformGap: number;
    mobileTouchInset: number;
    desktopToolbarGap: number;
    statusHintTop: number;
};
export type ChatInputRadiusTokens = {
    inputSurface: number;
    actionButton: number;
    attachmentPreview: number;
    waveformBar: number;
    mobileHoldToTalk: number;
    desktopInputSurface: number;
};
export type ChatInputMotionTokens = {
    pressFeedback: string;
    waveformPulse: string;
    stateTransition: string;
    transcribingLoading: string;
};
export type ChatInputShadowTokens = {
    inputElevated: string;
    recordingActive: string;
};
export type ChatInputTypographyScale = {
    size: number;
    lineHeight: number;
    weight: number;
};
export type ChatInputTypographyTokens = {
    familyBase: string;
    familyMono: string;
    inputText: ChatInputTypographyScale;
    statusHint: ChatInputTypographyScale;
    actionLabel: ChatInputTypographyScale;
    voiceHoldToTalk: ChatInputTypographyScale;
};
export type ChatInputTokens = {
    color: ChatInputColorTokens;
    spacing: ChatInputSpacingTokens;
    radius: ChatInputRadiusTokens;
    motion: ChatInputMotionTokens;
    shadow: ChatInputShadowTokens;
    typography: ChatInputTypographyTokens;
};
export type ChatInputSlotProps = {
    status: ChatInputStatus;
    mode: ChatInputMode;
    disabled?: boolean;
};
export type ChatInputSlots = {
    sendAction: ComponentType<ChatInputSlotProps>;
    statusHint: ComponentType<ChatInputSlotProps & {
        text?: string;
    }>;
    recordingFeedback: ComponentType<ChatInputSlotProps & {
        children?: ReactNode;
    }>;
};
export type ChatInputInitialState = {
    mode?: ChatInputMode;
    status?: ChatInputStatus;
    text?: string;
    transcript?: string;
    error?: string;
    attachments?: ChatAttachment[];
    waveformLevels?: number[];
};
export type ChatImageUploadResult = {
    name?: string;
    url: string;
    previewUrl?: string;
};
export type ChatImageConfig = {
    accept?: string;
    uploadImage?: (file: File) => Promise<ChatImageUploadResult>;
};
export type ChatInputBaseProps = {
    value?: string;
    defaultValue?: string;
    onChange?: (value: string) => void;
    onSend?: (payload: {
        text: string;
        attachments: ChatAttachment[];
        transcript?: string;
        audio?: Blob;
        mode?: "text" | "voice";
    }) => Promise<void> | void;
    enableVoice?: boolean;
    enableEmoji?: boolean;
    enableImage?: boolean;
    disabled?: boolean;
    authToken?: string;
    tokens?: DeepPartial<ChatInputTokens>;
    slots?: Partial<ChatInputSlots>;
    initialState?: ChatInputInitialState;
    voice?: ChatVoiceConfig;
    image?: ChatImageConfig;
};
export type ChatInputMobileProps = ChatInputBaseProps & {
    voiceModeDefault?: ChatInputMode;
};
export type ChatInputDesktopProps = ChatInputBaseProps & {
    submitShortcut?: "enter" | "meta-enter";
};
