// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only

import type { DropzoneOptions } from 'react-dropzone';
import { useDropzone } from 'react-dropzone';

export const useStickerDropzone = (
  onDrop: NonNullable<DropzoneOptions['onDrop']>,
  onDropRejected: NonNullable<DropzoneOptions['onDropRejected']>
): ReturnType<typeof useDropzone> =>
  useDropzone({
    onDrop,
    onDropRejected,
    accept: {
      'image/png': ['.png'],
      'image/webp': ['.webp'],
      'image/apng': ['.apng'],
    },
  });
