import { attachmentsService } from '../../apps'; import { FormTypes } from '@oneblink/types'; import { FormElementBinaryStorageValue } from '../../types/attachments'; export type OnChange = (id: string, attachment: attachmentsService.Attachment) => void; export default function useAttachment(value: FormElementBinaryStorageValue, element: FormTypes.FormElementBinaryStorage, onChange: OnChange, disableUpload?: boolean): { canDownload: boolean; progress: number | undefined; contentType: string | undefined; attachmentUrl?: string | null; loadAttachmentUrlError?: Error; isContentTypeImage?: boolean; isUploading: boolean; uploadErrorMessage: string | undefined; isLoadingAttachmentUrl: boolean; };