import { Typography, IconButton, Stack, Box } from "@mui/material"; import { Icon } from "@/Components/design-elements"; import { X } from "lucide-react"; import { SPACING, LAYOUT } from "@/Utils/Theme/constants"; import { useTheme } from "@mui/material"; import { useSelector, useDispatch } from "react-redux"; import { useTranslation } from "react-i18next"; import { setStarPromptOpen } from "@/Features/UI/uiSlice.js"; import type { RootState } from "@/Types/state.js"; import useSidebar from "@/Hooks/useSidebar.js"; export const StarPrompt = ({ repoUrl = "https://github.com/bluewave-labs/checkmate", }: { repoUrl?: string; }) => { const theme = useTheme(); const dispatch = useDispatch(); const { t } = useTranslation(); const isOpen = useSelector((state: RootState) => state.ui?.starPromptOpen ?? true); const mode = useSelector((state: RootState) => state.ui.mode); const { collapsed } = useSidebar(); const handleClose = () => { dispatch(setStarPromptOpen(false)); }; const handleStarClick = () => { window.open(repoUrl, "_blank"); }; if (collapsed) return null; if (!isOpen) return null; return ( {t("components.sidebar.starPrompt.title")} {t("components.sidebar.starPrompt.description")} ); };