import { MaterialIcon } from "./MaterialIcon";

type GlassInfoCardProps = {
  text: string;
  icon?: string;
  className?: string;
};

export function GlassInfoCard({ text, icon, className = "" }: GlassInfoCardProps) {
  return (
    <div
      className={`bg-white/80 backdrop-blur-md border border-white/40 shadow-[0_8px_24px_rgba(99,48,214,0.08)] rounded-[16px] px-4 py-2.5 flex items-center gap-2.5 select-none ${className}`}
    >
      {icon ? (
        <div className="w-6 h-6 rounded-full bg-[#6330D6]/10 text-[#6330D6] flex items-center justify-center shrink-0">
          <MaterialIcon icon={icon} size={14} />
        </div>
      ) : (
        <span className="w-2.5 h-2.5 rounded-full bg-[#6330D6] shrink-0 animate-pulse" />
      )}
      <span className="text-sm font-extrabold text-[#16001D] whitespace-nowrap">
        {text}
      </span>
    </div>
  );
}
