import { useState } from 'react';
import { MouseEventHandler, ReactElement } from 'react';

import { FileEmbedder } from './FileEmbedder';

export const FileLoader = () => {
  const [files, setFiles] = useState<File[]>()
  const handleEmbed = (files: File[]) => {
    setFiles(files)
    console.log(files);
  };

  const handleClick: MouseEventHandler<HTMLButtonElement> = (e) => {
    console.log(e);
  };

  return (
    <>
      <FileEmbedder handleEmbed={handleEmbed} />
      <button
        onClick={() => {
          console.log('sure');
        }}
      >
        <div>Embed</div>
      </button>
    </>
  );
};