import { ComposeboxContextAddedMethod } from '//resources/cr_components/search/constants.js';
import type { DriveUploadError, SuggestInventory } from '//resources/mojo/components/omnibox/browser/searchbox.mojom-webui.js';
import type { UnguessableToken } from '//resources/mojo/mojo/public/mojom/base/unguessable_token.mojom-webui.js';
import type { Url } from '//resources/mojo/url/mojom/url.mojom-webui.js';
import { ContextUploadErrorType, ContextUploadStatus, InputType, ModelMode, ToolMode } from './composebox_query.mojom-webui.js';
import type { InputState } from './composebox_query.mojom-webui.js';
export declare enum ComposeboxFileValidationError {
    NONE = 0,
    TOO_MANY_FILES = 1,
    FILE_EMPTY = 2,
    FILE_SIZE_TOO_LARGE = 3,
    MAX_VALUE = 3
}
export declare enum ContextType {
    TAB = 0,
    FILE = 1,
    IMAGE = 2,
    IMAGE_GEN = 3,
    DEEP_RESEARCH = 4,
    CANVAS = 5,
    AUTO_MODEL = 6,
    THINKING_MODEL = 7,
    REGULAR_MODEL = 8,
    PRO_NO_GEN_UI_MODEL = 9,
    UNKNOWN = 10,
    DRIVE = 11,
    MAX_VALUE = 11
}
export declare enum ProcessFilesError {
    NONE = 0,
    INVALID_TYPE = 1,
    FILE_TOO_LARGE = 2,
    FILE_EMPTY = 3,
    MAX_FILES_EXCEEDED = 4,
    MAX_IMAGES_EXCEEDED = 5,
    MAX_PDFS_EXCEEDED = 6,
    FILE_UPLOAD_NOT_ALLOWED = 7
}
export declare enum TabSuggestionsState {
    NOT_STARTED = 0,
    LOADING = 1,
    LOADED = 2
}
export declare const FILE_VALIDATION_ERRORS_MAP: Map<ContextUploadErrorType, string>;
export declare class ComposeboxFile {
    uuid: UnguessableToken;
    name: string;
    objectUrl: string | null;
    dataUrl: string | null;
    type: string;
    inputType: InputType;
    status: ContextUploadStatus;
    url: Url | null;
    tabId: number | null;
    isDeletable: boolean;
    iconName: string | null;
    supportsUnimodal: boolean;
    thumbnailUrl?: string | null;
    iconUrl?: Url | null;
    constructor(uuid: UnguessableToken, name: string, type: string, inputType: InputType, options?: Partial<ComposeboxFile>);
    static createFromFile(uuid: UnguessableToken, file: File | {
        name: string;
        type: string;
    }, status?: ContextUploadStatus, options?: Partial<ComposeboxFile>): ComposeboxFile;
    static createFromTab(uuid: UnguessableToken, tabId: number, title: string, url: Url, options?: Partial<ComposeboxFile>): ComposeboxFile;
    static createFromInjectedInput(uuid: UnguessableToken, dataUrl: string, name?: string, iconName?: string | null): ComposeboxFile;
}
export interface ComposeboxState {
    text: string;
    files: ContextualUpload[];
    error?: DriveUploadError;
    mode: ToolMode;
    model: ModelMode;
    suggestInventory?: SuggestInventory;
    smartTabSharingActive: boolean;
}
export interface FileUpload {
    file: File;
}
export interface DriveUpload {
    token: UnguessableToken;
    mimeType: string;
    fileName: string;
    thumbnailUrl: string | null;
    iconUrl: Url | null;
}
export declare enum TabUploadOrigin {
    CONTEXT_MENU = 0,
    RECENT_TAB_CHIP = 1,
    ACTION_CHIP = 2,
    AUTO_ACTIVE = 3,
    OTHER = 4
}
export interface TabUpload {
    tabId: number;
    url: Url;
    title: string;
    delayUpload: boolean;
    origin: TabUploadOrigin;
}
export type ContextualUpload = TabUpload | FileUpload | DriveUpload;
export declare enum GlifAnimationState {
    INELIGIBLE = "ineligible",
    SPINNER_ONLY = "spinner-only",
    STARTED = "started",
    FINISHED = "finished"
}
export declare enum ContextualSearchInputStateDeletionType {
    FILE = 0,
    TAB = 1,
    TOOL = 2,
    MAX_VALUE = 2
}
export declare function recordEnumerationValue(metricName: string, value: number, enumSize: number): void;
export declare function recordUserAction(metricName: string): void;
export declare function recordBoolean(metricName: string, value: boolean): void;
export declare function recordContextAdditionMethod(additionMethod: ComposeboxContextAddedMethod, composeboxSource: string): void;
export declare function recordContextualElementClickedMetric(composeboxSource: string, popupType: string, contextType: ContextType): void;
export declare function recordContextualElementShownMetric(composeboxSource: string, popupType: string, contextType: ContextType): void;
export declare function recordToolModeSelection(mode: ToolMode, composeboxSource: string, popupType: string): void;
export declare function recordToolModeShown(mode: ToolMode, composeboxSource: string, popupType: string): void;
export declare function recordModelModeSelection(model: ModelMode, composeboxSource: string, popupType: string): void;
export declare function recordModelModeShown(model: ModelMode, composeboxSource: string, popupType: string): void;
export declare function recordInputTypeShown(type: InputType, composeboxSource: string, popupType: string): void;
export declare function hasAllowedInputs(inputState: InputState | null, usePecApi: boolean): boolean;
/**
 * Helper to retrieve a boolean from loadTimeData with a fallback if the
 * value hasn't been set.
 */
export declare function getLoadTimeBoolean(id: string, defaultValue: boolean): boolean;
export declare function isContextUploadStatusTerminal(status: ContextUploadStatus): boolean;
export declare function mapUploadErrorToProcessFilesError(errorType: ContextUploadErrorType): ProcessFilesError;
