import type { PackerConfig, PackerOption } from "@/types/memshell"; import type { ProbeShellFormSchema } from "@/types/schema"; import { PackageIcon } from "lucide-react"; import { useMemo } from "react"; import { Controller, type UseFormReturn } from "react-hook-form"; import { useTranslation } from "react-i18next"; import PackerSelector from "@/components/packer-selector"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; export default function PackageConfigCard({ packerConfig, form, }: Readonly<{ packerConfig: PackerConfig | undefined; form: UseFormReturn; }>) { const { t } = useTranslation("common"); const parents = useMemo(() => { return (packerConfig ?? []).filter(({ name }) => { return ( !name.startsWith("Agent") && !name.toLowerCase().startsWith("xxl") && !name.toLowerCase().endsWith("jar") ); }); }, [packerConfig]); return ( {t("packerConfig.title")} {parents.length > 0 ? ( ( )} /> ) : (
{t("loading")}
)} ); }