"use client";

import { Button } from "@/components/ui/button";
import { Navigation } from "lucide-react";

interface DirectionsButtonProps {
  latitude: number;
  longitude: number;
  className?: string;
}

export function DirectionsButton({ latitude, longitude, className }: DirectionsButtonProps) {
  const handleClick = () => {
    const url = `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;
    window.open(url, '_blank');
  };

  return (
    <Button
      variant="outline"
      className={className}
      onClick={handleClick}
    >
      <Navigation className="w-4 h-4 mr-2" />
      Get Directions
    </Button>
  );
}
