import type { LinkProps, TypographyProps } from '@mui/material';
import { Link, Typography } from '@mui/material';

export interface PoweredByArcBlockProps extends TypographyProps {
  linkProps?: LinkProps;
  showExtra?: boolean;
}

export default function PoweredByArcBlock({
  linkProps = undefined,
  showExtra = false,
  ...props
}: PoweredByArcBlockProps) {
  return (
    <Typography {...props}>
      Powered by{' '}
      <Link href="https://www.arcblock.io" target="_blank" {...linkProps}>
        ArcBlock
      </Link>
      's{' '}
      <Link href="https://www.blocklet.io" target="_blank" {...linkProps}>
        Blocklet Technology
      </Link>
      {showExtra ? ', the decentralized web engine.' : null}
    </Typography>
  );
}
