import FrontCameraOverviewCard from "../components/FrontCameraOverview/FrontCameraOverviewCard";
import RearCameraOverviewCard from "../components/RearCameraOverview/RearCameraOverviewCard";
import SightingHistoryWidget from "../components/SightingsWidget/SightingWidget";
import { SightingFeedProvider } from "../context/providers/SightingFeedProvider";

const Dashboard = () => {
  // const AGX_url = import.meta.env.VITE_AGX_BOX_URL;
  // const AGX_rear_url = import.meta.env.VITE_AGX_BOX_REAR_UR;
  const test = import.meta.env.VITE_LOCAL;
  const testFront = import.meta.env.VITE_LOCAL_FRONT;
  return (
    <div className="mx-auto grid grid-cols-1  sm:grid-cols-1 lg:grid-cols-2 gap-2 px-1 sm:px-2 lg:px-0 w-full">
      <SightingFeedProvider url={testFront} side="Front">
        <FrontCameraOverviewCard className="order-1" />
        <SightingHistoryWidget
          className="order-3"
          title="Front Camera Sightings"
        />
      </SightingFeedProvider>

      <SightingFeedProvider url={test} side="Rear">
        <RearCameraOverviewCard className="order-2" />
        <SightingHistoryWidget
          className="order-4"
          title="Rear Camera Sightings"
        />
      </SightingFeedProvider>
    </div>
  );
};

export default Dashboard;
