import KFIcon from '@/components/KFIcon';
import { ProBreadcrumb } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import { Button } from 'antd';
import React from 'react';
import Avatar from './AvatarDropdown';
import styles from './index.less';
// import { SelectLang } from '@umijs/max';

export type SiderTheme = 'light' | 'dark';

const GlobalHeaderRight: React.FC = () => {
  const { initialState, setInitialState } = useModel('@@initialState');

  if (!initialState || !initialState.settings) {
    return null;
  }

  const handleMenuCollapse = () => {
    setInitialState((preInitialState) => ({
      ...preInitialState,
      collapsed: !preInitialState?.collapsed,
    }));
  };

  return (
    <div className={styles['right-content']}>
      {/* <span
        className={actionClassName}
        onClick={() => {
          window.open('https://pro.ant.design/docs/getting-started');
        }}
      >
        <QuestionCircleOutlined />
      </span> */}

      <Button
        type="text"
        style={{ marginRight: '4px' }}
        icon={<KFIcon type="icon-collapsed" font={18} style={{ verticalAlign: '-3px' }} />}
        onClick={handleMenuCollapse}
      ></Button>

      <ProBreadcrumb></ProBreadcrumb>

      <Avatar menu={true} />
      {/* <SelectLang className={actionClassName} /> */}
    </div>
  );
};
export default GlobalHeaderRight;
