import React from "react"; import { Link } from "react-router-dom"; import { Heart, LogOut, LogIn } from "lucide-react"; import { useAuth } from "../hooks/useAuth"; import { ProfileSelector } from "./ProfileSelector"; import { i18n } from "../i18n"; import Logo from "./images/logo.PNG"; const Header: React.FC = () => { const { user, logout, role, isAuthenticated } = useAuth(); const roleLabel: Record = { secretaria: "Secretaria", medico: "Médico", paciente: "Paciente", admin: "Administrador", gestor: "Gestor", }; return (
{/* Skip to content link for accessibility */} {i18n.t("common.skipToContent")}
{/* Logo */} {i18n.t("header.logo")}

{i18n.t("header.logo")}

{i18n.t("header.subtitle")}

{/* Desktop Navigation */} {/* User Session / Auth */}
{isAuthenticated && user ? ( <>

{user.nome.split(" ").slice(0, 2).join(" ")}

{role ? roleLabel[role] || role : ""}

) : (
{/* Mobile menu button */}
{/* Mobile Navigation */}
); }; export default Header;