import type { ReactNode } from 'react' import type { ClassName } from 'rntwsc/tw/class-name' import type { LinkPropsWocn } from 'rntwsc/tw/components/without-class-name/link-untyped' import { LinkUntypedWocn } from 'rntwsc/tw/components/without-class-name/link-untyped' import { createClassNameComponent } from 'rntwsc/tw/lib/create-class-name-component' export type LinkProps< Routes = any, Data = any, K extends keyof Routes = any, Q = K extends keyof Data ? Data[K] : never, > = LinkPropsWocn & { className?: ClassName } export type LinkComponent = ( p: LinkProps, ) => ReactNode export const LinkUntyped: LinkComponent = createClassNameComponent({ LinkUntypedWocn, })