import type { ReactNode } from "react"; import { ExternalLink, Info, RotateCw } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; import type { currentWebPreviewRestriction } from "@/lib/web-preview"; export function WebPreviewPanelView({ url, restriction, loopback, onRefresh, children }: { url: URL | null; restriction: ReturnType; loopback: boolean; onRefresh: () => void; children?: ReactNode; }) { const { t } = useTranslation(); const buttonClass = "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"; return (

{url?.href}

{t("webPreview.isolated")}

{t("webPreview.blockedHint")}

{loopback ?

{t("webPreview.loopback")}

: null}
{!restriction ? : null} {url ? : null}
{restriction ?
{t(`webPreview.${restriction}`)}
: children}
); }