import { useState } from "react"; import { useTranslation } from "react-i18next"; import { LuSettings } from "react-icons/lu"; import useSWR from "swr"; import ActivityIndicator from "@/components/indicators/activity-indicator"; import { ConfigSectionTemplate } from "@/components/config-form/sections/ConfigSectionTemplate"; import { Button } from "@/components/ui/button"; import { PlatformAwareSheet } from "@/components/overlay/dialog/PlatformAwareDialog"; import { useConfigSchema } from "@/hooks/use-config-schema"; import type { FrigateConfig } from "@/types/frigateConfig"; type DebugReplayConfigSheetProps = { replayCamera: string | undefined; }; export function DebugReplayConfigSheet({ replayCamera, }: DebugReplayConfigSheetProps) { const { t } = useTranslation(["views/replay"]); const configSchema = useConfigSchema(); const { data: config } = useSWR("config", { revalidateOnFocus: false, }); const [open, setOpen] = useState(false); return ( {t("page.configuration")} } title={t("page.configuration")} titleClassName="text-lg font-semibold" contentClassName="scrollbar-container flex flex-col gap-0 overflow-y-auto px-6 pb-6 sm:max-w-xl md:max-w-2xl xl:max-w-3xl" content={ <>

{t("page.configurationDesc")}

{configSchema == null ? (
) : (
{config?.face_recognition?.enabled && ( )} {config?.lpr?.enabled && ( )}
)} } open={open} onOpenChange={setOpen} /> ); }