"use client";

import { Button } from "@/components/ui/button";
import { Check, RotateCcw } from "lucide-react";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { toast } from "sonner";

interface ActionButtonsProps {
  onReset: () => void;
}

export function ActionButtons({ onReset }: ActionButtonsProps) {
  const handleApply = () => {
    toast.info("Settings updated and will be used for all downloads.");
  };

  return (
    <TooltipProvider>
      <div className="flex items-center gap-2">
        <Tooltip>
          <TooltipTrigger asChild>
            <Button onClick={onReset} className="w-full" variant="outline">
              <RotateCcw className="mr-2 h-4 w-4" /> Reset
            </Button>
          </TooltipTrigger>
          <TooltipContent><p>Reset all settings to their default values.</p></TooltipContent>
        </Tooltip>
        <Tooltip>
          <TooltipTrigger asChild>
            <Button onClick={handleApply} className="w-full">
              <Check className="mr-2 h-4 w-4" /> Apply
            </Button>
          </TooltipTrigger>
          <TooltipContent><p>Confirm and apply all the settings above. This does not download the images.</p></TooltipContent>
        </Tooltip>
      </div>
    </TooltipProvider>
  );
}