import { useTranslation } from "react-i18next"; import { FormLabel } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Zap } from "lucide-react"; interface EndpointFieldProps { id: string; label: string; value: string; onChange: (value: string) => void; placeholder: string; hint?: string; showManageButton?: boolean; onManageClick?: () => void; manageButtonLabel?: string; } export function EndpointField({ id, label, value, onChange, placeholder, hint, showManageButton = true, onManageClick, manageButtonLabel, }: EndpointFieldProps) { const { t } = useTranslation(); const defaultManageLabel = t("providerForm.manageAndTest", { defaultValue: "管理和测速", }); return (
{hint}