import { ShieldCheck } from 'lucide-react';
import PwaProfileAvatar from './PwaProfileAvatar';

export default function PwaProfileHeader({ user }) {
  return (
    <section className="pwa-profile-hero">
      <PwaProfileAvatar user={user} />
      <div>
        <span>پروفایل کاربری</span>
        <h2>{user?.name || 'کاربر'}</h2>
        <p>{user?.email || 'ایمیل ثبت نشده'}</p>
        <div className="pwa-profile-badges">
          {user?.primary_role && <em><ShieldCheck size={14} /> {user.primary_role}</em>}
          {user?.job_title && <em>{user.job_title}</em>}
          {user?.department && <em>{user.department}</em>}
        </div>
      </div>
    </section>
  );
}
