import type { ReactNode } from "react"; import type { IssueRelationIssueSummary } from "@paperclipai/shared"; import { Link } from "@/lib/router"; import { cn } from "../lib/utils"; import { StatusIcon } from "./StatusIcon"; export function IssueReferencePill({ issue, strikethrough, className, children, }: { issue: Pick & Partial>; strikethrough?: boolean; className?: string; children?: ReactNode; }) { const issueLabel = issue.identifier ?? issue.title; const classNames = cn( "paperclip-mention-chip paperclip-mention-chip--issue", "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs no-underline", issue.identifier && "hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", strikethrough && "opacity-60 line-through decoration-muted-foreground", className, ); const content = ( <> {issue.status ? : null} {children !== undefined ? children : {issue.identifier ?? issue.title}} ); if (!issue.identifier) { return ( {content} ); } return ( {content} ); }