'use client';

import Image from 'next/image';
import { IconButton } from '@/components/ui/button';
import Link from 'next/link';
import React from 'react';
import { useMedia } from '@/hooks/tools';

const Header = React.memo(() => {
  const response = useMedia();

  return (
    <Link href="/crushcoin">
      <div
        className="h-50 rounded-4xl px-6 mb-12 flex items-center justify-between"
        style={{
          background:
            'linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(202, 153, 255, 0.2) 100%)',
        }}
      >
        <div className="flex gap-3 items-center">
          <Image
            src="/images/home/icon-crush-free.png"
            className="h-30 w-30 object-cover"
            alt="header-bg"
            width={120}
            height={120}
          />
          <div>
            <div className="flex gap-5 txt-display-l">
              Check-in{' '}
              <Image
                src="/images/home/left-star.png"
                className="h-12 w-12 object-cover"
                alt="header-bg"
                width={48}
                height={48}
              />
            </div>
            <div className="flex gap-5 items-center">
              <span
                className="txt-headline-s bg-clip-text text-transparent"
                style={{
                  background:
                    'linear-gradient(109.2deg, rgba(211, 123, 235, 1) 37.08%, rgba(147, 123, 235, 1) 128.91%)',
                  WebkitBackgroundClip: 'text',
                  WebkitTextFillColor: 'transparent',
                  backgroundClip: 'text',
                }}
              >
                Daily Free crush coinsh
              </span>
              <IconButton iconfont="icon-arrow-right-border" size="small" variant="primary" />
            </div>
          </div>
        </div>
        {response?.lg && (
          <Image
            src="/images/home/banner-header.png"
            alt="banner-header"
            width={250}
            height={250}
          />
        )}
      </div>
    </Link>
  );
});

export default Header;
