"use client";

import Image from "next/image";
import type { ReactNode } from "react";

import { cn } from "@/lib/utils";

type EntryHeroBannerProps = {
  src: string;
  alt?: string;
  className?: string;
  imageClassName?: string;
  children?: ReactNode;
};

/** 登录/入场页插画：仅移动端顶部横幅。 */
export function EntryHeroBanner({
  src,
  alt = "",
  className,
  imageClassName,
  children,
}: EntryHeroBannerProps) {
  return (
    <div
      className={cn(
        "relative w-full shrink-0 overflow-hidden lg:hidden",
        className,
      )}
    >
      <Image
        src={src}
        alt={alt}
        width={1228}
        height={1108}
        sizes="(max-width: 480px) 100vw, 480px"
        className={cn("block h-auto w-full", imageClassName)}
        priority
      />
      {children}
    </div>
  );
}