import React from "react";

const Header = ({ title, user }) => {
  return (
    <header className="no-print mb-6 flex flex-col gap-2 border-b border-primary pb-4 md:flex-row md:items-center md:justify-between">
      <div>
        <h2 className="text-2xl font-bold text-primary">{title}</h2>
        <p className="text-sm text-primary">Employee Payroll Management System</p>
      </div>
      <div className="rounded-md border border-primary px-4 py-2 text-sm font-semibold">
        {user?.username || "Administrator"}
      </div>
    </header>
  );
};

export default Header;
