import clsx from "clsx";
import Card from "../UI/Card";
import { useSwipeable } from "react-swipeable";
import { useNavigate } from "react-router";
import { useOverviewVideo } from "../../hooks/useOverviewVideo";
import SightingOverview from "../SightingOverview/SightingOverview";

const FrontCameraOverviewCard = () => {
  useOverviewVideo();
  const navigate = useNavigate();
  const handlers = useSwipeable({
    onSwipedRight: () => navigate("/front-camera-settings"),

    trackMouse: true,
  });

  return (
    <Card
      className={clsx(
        "relative min-h-[40vh] md:min-h-[60vh] max-h-[80vh] lg:w-[70%] overflow-y-hidden"
      )}
    >
      <div className="lg:overflow-hidden" {...handlers}>
        <SightingOverview />
      </div>
    </Card>
  );
};

export default FrontCameraOverviewCard;
