import React from 'react';
import Actions from './Actions';
import UserInfo from './UserInfo';
import Search from './Search';
import styles from './index.less';
import { MenuDataItem } from '../typings';

declare type HeaderProp = {
  originalMenu: MenuDataItem[];
  onMenuSelect: Function;
};

const Header: React.FC<HeaderProp> = ({ originalMenu, onMenuSelect }) => {
  return (
    <div className={styles.header}>
      <div className={styles.search}>
        <Search originalMenu={originalMenu} onMenuSelect={onMenuSelect} />
      </div>
      <div className={styles.avatar}>
        <UserInfo />
      </div>
    </div>
  );
};

export default Header;
