"use client";
import type { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@kandev/ui/dialog";
import {
Drawer,
DrawerContent,
DrawerDescription,
DrawerHeader,
DrawerTitle,
} from "@kandev/ui/drawer";
const UPDATE_AGENT_KEY = "agents:updateAgent";
export function AgentRuntimeUpdateSurface({
agentName,
displayName,
isMobile,
open,
onOpenChange,
body,
footer,
}: {
agentName: string;
displayName: string;
isMobile: boolean;
open: boolean;
onOpenChange: (nextOpen: boolean) => void;
body: ReactNode;
footer: (mobile?: boolean) => ReactNode;
}) {
const { t } = useTranslation();
if (isMobile) {
return (
{t(UPDATE_AGENT_KEY, { name: displayName })}
{t("agents:reviewUpdateBeforeApplying")}
{body}
{footer(true)}
);
}
return (
);
}