import { useRef } from "react";
import { ExternalLink, Sparkle, Star, X } from "lucide-react";
import { useTranslation } from "react-i18next";
import starInvitation from "@/assets/star-invitation.webp";
import starInvitationNight from "@/assets/star-invitation-night.webp";
import { Button } from "@/components/ui/button";
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle } from "@/components/ui/dialog";
import "./StarPrompt.css";
const REPOSITORY_URL = "https://github.com/HKUDS/nanobot";
const actionClassName = "h-full min-h-[46px] min-w-0 !whitespace-normal px-3 py-2.5 text-center text-[15px] font-medium max-[480px]:text-sm";
export function StarLinkView({ onActivate, error = false, fullWidth = false }: {
onActivate: () => void;
error?: boolean;
fullWidth?: boolean;
}) {
const { t } = useTranslation();
const link = (
{ if (event.button === 1) onActivate(); }}>
{!fullWidth &&
{t("starPrompt.saveError")}
} > ); } export function StarPromptView({ open, saving, error, starError = false, onOpenChange, onDismissForever, onStar, onCloseAutoFocus }: { open: boolean; saving: boolean; error: boolean; starError?: boolean; onOpenChange: (open: boolean) => void; onDismissForever: () => void; onStar: () => void; onCloseAutoFocus?: (event: Event) => void; }) { const { t } = useTranslation(); const titleRef = useRef