import type { ReactNode } from "react"; import type { IssueMentionItem } from "../api"; import "./IssueMentionPopup.css"; export interface IssueMentionPopupProps { visible: boolean; position: { top: number; left: number }; issues: IssueMentionItem[]; selectedIndex: number; onSelect: (issue: IssueMentionItem) => void; loading: boolean; } export function IssueMentionPopup({ visible, position, issues, selectedIndex, onSelect, loading, }: IssueMentionPopupProps): ReactNode | null { if (!visible) return null; return (
{ event.preventDefault(); }} > {loading && (
)} {!loading && issues.length === 0 && (
No issues found
)} {!loading && issues.length > 0 && ( )}
); }