import styles from './telegramCardButton.module.scss';
import Link, { LinkProps } from 'next/link';
import LinkIcon from '@/assets/icons/link.svg';
import clsx from 'clsx';
import { CursorEffect } from '@/components/cursor';

type TelegramCardButtonProps = Omit<LinkProps, 'href'> & { className?: string };

export function TelegramCardButton(props: TelegramCardButtonProps) {
  const { className: restCalssName, ...restProps } = props;

  return (
    <CursorEffect cursorBorderRadius={36} cursorPadding={12}>
      <div className={clsx(styles.card, restCalssName)}>
        <Link
          {...restProps}
          target="_blank"
          href="https://t.me/ridebus"
        >
          <div className={styles.content}>
            <span className={styles.storeNameText}>Telegram</span>
            <LinkIcon className={styles.linkIcon} />
          </div>
        </Link>
      </div>
    </CursorEffect>
  );
}