import type { SightingType } from "../../types/types";
import { useState } from "react";
type SightingWidgetDetailsProps = {
effectiveSelected: SightingType | null;
};
const SightingWidgetDetails = ({
effectiveSelected,
}: SightingWidgetDetailsProps) => {
const [advancedDetailsEnabled, setAdvancedDetailsEnabled] = useState(false);
const handleDetailsClick = () =>
setAdvancedDetailsEnabled(!advancedDetailsEnabled);
return (
<>
VRM:{" "}
{effectiveSelected?.vrm ?? "—"}
Make:{" "}
{effectiveSelected?.make ?? "—"}
Model:{" "}
{effectiveSelected?.model ?? "—"}
Colour:{" "}
{effectiveSelected?.color ?? "—"}
Timestamp:{" "}
{effectiveSelected?.timeStamp ?? "—"}
{advancedDetailsEnabled && (
<>
Country:{" "}
{effectiveSelected?.countryCode ?? "—"}
Seen:{" "}
{effectiveSelected?.seenCount ?? "—"}
Category:{" "}
{effectiveSelected?.category ?? "—"}
Char Ht:{" "}
{effectiveSelected?.charHeight ?? "—"}
Plate Size:{" "}
{effectiveSelected?.plateSize ?? "—"}
Overview Size:{" "}
{effectiveSelected?.overviewSize ?? "—"}
>
)}