import { useTranslation } from "react-i18next"; import type { TunnelMode } from "@/types/index.js"; type TunnelModeSelectorProps = { mode: TunnelMode; scope: "client" | "server"; onChange: (mode: TunnelMode) => void; }; export function TunnelModeSelector({ mode, scope, onChange, }: TunnelModeSelectorProps) { const { t } = useTranslation(); const options: Array<{ value: TunnelMode; label: string; description: string; }> = [ { value: "local", label: t("tunnels.typeLocal"), description: scope === "client" ? t("tunnels.typeClientLocalDesc") : t("tunnels.typeServerLocalDesc"), }, { value: "remote", label: t("tunnels.typeRemote"), description: scope === "client" ? t("tunnels.typeClientRemoteDesc") : t("tunnels.typeServerRemoteDesc"), }, { value: "dynamic", label: t("tunnels.typeDynamic"), description: scope === "client" ? t("tunnels.typeClientDynamicDesc") : t("tunnels.typeDynamicDesc"), }, ]; return (