export default function PwaProjectMemberList({ members = [] }) {
  if (!members.length) return <div className="pwa-empty-inline">عضوی برای این پروژه ثبت نشده است.</div>;

  return (
    <div className="pwa-project-members">
      {members.map((member) => (
        <article key={member.id}>
          <span>{member.avatar_url ? <img src={member.avatar_url} alt={member.name} /> : member.name?.[0] || 'ک'}</span>
          <div>
            <strong>{member.name}</strong>
            <small>{member.role_in_project || member.job_title || 'عضو پروژه'}</small>
          </div>
        </article>
      ))}
    </div>
  );
}
