import React, {useState} from "react";
import Logo from "../Logo/Logo.tsx";
import Account from "../Account/Account.tsx";
import styles from './Header.module.css'
import SurveyPagesList from "../SurveyPagesList/SurveyPagesList.tsx";

interface HeaderProps {}

const Header: React.FC<HeaderProps> = () => {
    const [activePage, setActivePage] = useState('Создать опрос');

    const handlePageClick = (name: string)=> {
        setActivePage(name);
    }

    return (
        <div className={styles.header}>
            <Logo href='' />
            <SurveyPagesList
                activePage={activePage}
                onPageClick = {handlePageClick}
            />
            <Account
                href=''
                user='Иванов Иван'
            />
        </div>
    );
};

export default Header;