import { ComponentType } from "react"; import { useTranslation } from "react-i18next"; import { Browser } from "@wailsio/runtime"; import { ExternalLinkIcon, LucideProps } from "lucide-react"; import { cn } from "@/lib/cn"; import { SquareIcon } from "@/components/SquareIcon"; type Props = { icon: ComponentType; title: string; description?: string; learnMoreUrl?: string; learnMoreTopic?: string; className?: string; }; const openUrl = (url: string) => { void Browser.OpenURL(url).catch(() => window.open(url, "_blank")); }; export const EmptyState = ({ icon, title, description, learnMoreUrl, learnMoreTopic, className, }: Props) => { const { t } = useTranslation(); return (

{title}

{description &&

{description}

} {learnMoreUrl && learnMoreTopic && (

{t("common.learnMoreAbout")}{" "} { e.preventDefault(); openUrl(learnMoreUrl); }} className={cn( "text-netbird hover:underline underline-offset-4", "cursor-pointer wails-no-draggable", "inline-flex items-center gap-1", )} > {learnMoreTopic}

)}
); };