import { toast } from 'sonner'
import { SvgDelete1 } from '@chainlink/blocks-icons'
import type { PlatformAdProps } from './PlatformAd'

export const PlatformAdClose = ({
  toastId,
}: {
  toastId: NonNullable<PlatformAdProps['toastId']>
}) => (
  <button
    aria-label="Close Plaform Ad"
    onClick={() => toast.dismiss(toastId)}
    className="group h-fit text-platform-ad-link hover:text-platform-ad-link-hover focus:outline-none focus:ring-2 focus:ring-ring"
  >
    <SvgDelete1 color="currentColor" />
  </button>
)
