+ {zones && zones?.length > 0 && (
+ <>
+
+
+ Detections{" "}
+
+
+ {selectDetections && (
+
+ Select zones for Detections
+
+ )}
+
+
+ {selectDetections && (
+
+ {zones?.map((zone) => (
+ {
+ return (
+
+
+ {
+ return checked
+ ? field.onChange([
+ ...field.value,
+ zone.name,
+ ])
+ : field.onChange(
+ field.value?.filter(
+ (value) =>
+ value !== zone.name,
+ ),
+ );
+ }}
+ />
+
+
+ {zone.name.replaceAll("_", " ")}
+
+
+ );
+ }}
+ />
+ ))}
+
+ )}
+
+
+
+
+
+
+ Limit detections to specific zones
+
+
+
+ >
+ )}
+
+
+ All {detectionsLabels} objects{" "}
+ not classified as Alerts {" "}
+ {watchedDetectionsZones &&
+ watchedDetectionsZones.length > 0
+ ? ` that are detected in ${watchedDetectionsZones.map((zone) => capitalizeFirstLetter(zone).replaceAll("_", " ")).join(", ")}`
+ : ""}{" "}
+ on{" "}
+ {capitalizeFirstLetter(
+ cameraConfig?.name ?? "",
+ ).replaceAll("_", " ")}{" "}
+ will be shown as Detections
+ {(!selectDetections ||
+ (watchedDetectionsZones &&
+ watchedDetectionsZones.length === 0)) &&
+ ", regardless of zone"}
+ .
+
+
+ )}
+ />
+