import type { ComponentType, ReactNode } from 'react' /** next/link, passed in by the project (the plugin never imports next/*). */ export type LinkComponent = ComponentType<{ children?: ReactNode; className?: string; href: string; rel?: string; target?: string }> /** An internal link through `Link` when the project passed one, otherwise a plain . */ export function Anchor({ children, className, href, internal, Link, targetProps }: { children: ReactNode; className?: string; href: string; internal: boolean; Link?: LinkComponent; targetProps: Record }) { if (internal && Link) { return ( {children} ) } return ( {children} ) }