import { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { ChevronDown } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import { Disclosure } from "@/components/ui/disclosure"; import { fetchSettings, type UpdateGuide as Guide } from "@/lib/api"; import { copyTextToClipboard } from "@/lib/clipboard"; function Command({ command, label, collapsed = false }: { command: string; label: string; collapsed?: boolean }) { const { t } = useTranslation(); const [copy, setCopy] = useState<"idle" | "pending" | "copied" | "failed">("idle"); const content =
{label}