import React from "react";

const EmployeeNav = ({ onPillClick, activePill }) => {
  return (
    <div className="col-md-12">
      <div className="nav-align-top">
        <ul className="nav nav-pills flex-column flex-sm-row mb-6">
          <li className="nav-item">
            <a
              className={`nav-link ${activePill === "account" ? "active" : ""}`}
              href="#"
              onClick={(e) => {
                e.preventDefault(); // Prevent page reload
                onPillClick("account");
              }}
            >
              <i className="bx bx-user bx-sm me-1_5"></i> Account
            </a>
          </li>
          <li className="nav-item">
            <a
              className={`nav-link ${activePill === "attendance" ? "active" : ""}`}
              href="#"
              onClick={(e) => {
                e.preventDefault(); // Prevent page reload
                onPillClick("attendance");
              }}
            >
              <i className="bx bx-group bx-sm me-1_5"></i> Attendances
            </a>
          </li>
          <li className="nav-item">
            <a
              className={`nav-link ${activePill === "activities" ? "active" : ""}`}
              href="#"
              onClick={(e) => {
                e.preventDefault(); // Prevent page reload
                onPillClick("activities");
              }}
            >
              <i className="bx bx-grid-alt bx-sm me-1_5"></i> Activities
            </a>
          </li>
        </ul>
      </div>
    </div>
  );
};

export default EmployeeNav;
