import {
  LinkIcon,
  Loader2,
  Trash2,
  UploadIcon,
} from 'lucide-react';

import { Button } from '@/components/ui/button';
import { Lang } from '@/lang/Lang';

type FileDataVideoEditActionsProps = {
  uploading: boolean;
  buttonTitle: string;
  isMobile: boolean;
  col: number;
  onDelete: () => void;
  onUpload: () => void;
  onCopyLink: () => void;
};

export const FileDataVideoEditActions = ({
  uploading,
  buttonTitle,
  isMobile,
  col,
  onDelete,
  onUpload,
  onCopyLink,
}: FileDataVideoEditActionsProps) => (
  <div className='flex items-center gap-2'>
    <Button
      variant='ghost'
      size='icon'
      tooltip={Lang.key('delete')}
      aria-label={Lang.key('delete')}
      onClick={(e) => {
        e.preventDefault();
        onDelete();
      }}
    >
      <Trash2 />
    </Button>
    <Button
      variant='ghost'
      tooltip={Lang.key('upload_new')}
      aria-label={Lang.key('upload_new')}
      onClick={(e) => {
        e.preventDefault();
        onUpload();
      }}
    >
      {uploading ? (
        <>
          <Loader2 className='size-4 animate-spin' />
          {Lang.key('uploading_file_wait')}
        </>
      ) : (
        <>
          <UploadIcon />

        </>
      )}
    </Button>
    <Button
      variant='ghost'
      tooltip={Lang.key('copy_link')}
      aria-label={Lang.key('copy_link')}
      onClick={(e) => {
        e.preventDefault();
        onCopyLink();
      }}
    >
      <LinkIcon />

    </Button>
  </div>
);
