import type { ComponentPropsWithoutRef, FC } from 'react'; import type { LinkProps } from 'react-router-dom'; import type { Account } from '@/flavours/glitch/models/account'; import { Permalink } from 'flavours/glitch/components/permalink'; import { DisplayNameDefault } from './default'; import { DisplayNameWithoutDomain } from './no-domain'; import { DisplayNameSimple } from './simple'; export interface DisplayNameProps { account?: Account; localDomain?: string; variant?: 'default' | 'simple' | 'noDomain'; } export const DisplayName: FC< DisplayNameProps & ComponentPropsWithoutRef<'span'> > = ({ variant = 'default', ...props }) => { if (variant === 'simple') { return ; } else if (variant === 'noDomain') { return ; } return ; }; export const LinkedDisplayName: FC< Omit & { displayProps: DisplayNameProps & ComponentPropsWithoutRef<'span'>; } > = ({ displayProps, children, ...linkProps }) => { const { account } = displayProps; if (!account) { return ; } return ( {children} ); };