import React, { useState } from "react";
import { Button } from "@/components/ui/button";
import { UploadDialog } from "./UploadDialog";
import { Upload } from "lucide-react";

export function UploadSection() {
  const [isDialogOpen, setIsDialogOpen] = useState(false);

  return (
    <div className="space-y-2">
      <Button
        onClick={() => setIsDialogOpen(true)}
        className="w-full justify-start gap-2"
        size="lg"
        data-upload-trigger
      >
        <Upload className="h-4 w-4" />
        Upload Trace
      </Button>

      <UploadDialog open={isDialogOpen} onOpenChange={setIsDialogOpen} />
    </div>
  );
}
