import type { PropType, ExtractPropTypes } from 'vue'; export declare enum UploadStatus { Idle = 1, InQueue = 2, InProgress = 3 } /** * File upload form field common props. */ export declare function getFileFieldProps(options?: { defaultAccept?: string; }): { multiple: { type: BooleanConstructor; default: boolean; }; accept: { type: StringConstructor; default: string; }; uploadMessage: { type: StringConstructor; default: string; }; valueLabel: { type: StringConstructor; default: string; }; uploadEndpoint: { type: StringConstructor; default: string; }; urlTemplate: { type: StringConstructor; default: string; }; modelValue: { type: PropType; default: null; }; disabled: { type: BooleanConstructor; default: boolean; }; errors: { type: PropType; default: null; }; allErrors: { type: PropType | null>; default: null; }; placeholder: { type: StringConstructor; default: string; }; required: { type: BooleanConstructor; default: boolean; }; fieldKey: { type: StringConstructor; default: string; }; context: { type: PropType | null>; default: null; }; formObject: { type: PropType | null>; default: null; }; formObjectId: { type: (StringConstructor | NumberConstructor)[]; default: string; }; }; /** * File input upload logic, supports multiple uploads. * @param config HTTP uploads endpoint, onUpload is called on each file upload with HTTP response */ export declare function useFileInput(config: Readonly<{ endpoint: string; onUpload: (response: T) => void; }>): { UploadStatus: typeof UploadStatus; uploadStatus: import("vue").Ref; uploadProgress: import("vue").Ref; uploadFile: (file: Blob) => Promise; onFileInputChange(e: Event): Promise; }; /** * Common setup for built-in file based fields. * @param props file field props, @see getFileFieldProps * @param onModelValueUpdate emit value here * @returns */ export default function useFieldWithFileUploads(props: ExtractPropTypes>, onModelValueUpdate: (files: string | string[] | null) => void): { modelValueItems: import("vue").ComputedRef<{ value: string; url: string; }[]>; clearValue(): void; removeItem(index: number): void; UploadStatus: typeof UploadStatus; uploadStatus: import("vue").Ref; uploadProgress: import("vue").Ref; uploadFile: (file: Blob) => Promise; onFileInputChange(e: Event): Promise; onDragAndDrop(event: unknown): void; trans: (key: string) => string; };