import EasyvButton from 'components/EasyvButton';
import React from 'react';
import { Link } from 'react-router-dom';
// import { Menu } from './Menu';

import styles from './TemplateHeader.less';
/* const categorys = [
  {
    id: 0,
    name: '所有模板'
  },
  {
    id: 1,
    name: '我的'
  },
  {
    id: 2,
    name: '推荐'
  }
]; */

export default function TemplateHeader() {
  return (
    <div className={styles.container}>
      <div className={styles.centerBox}>
        <Link to="/" className={styles.back}>
          <i className="icon iconfont icon-btn_arrowsleft" />
        </Link>
        {/* 独立部署的时候才允许出现菜单分类、5.2需求 */}
        {/* {window.appConfig.LOCAL && <Menu className={styles.menu} list={categorys} selectedId={category} onClick={setCategory} />} */}
        {!window.appConfig.LOCAL && (
          <EasyvButton theme="primary" onClick={() => (window.location.href = window.appConfig.MARKET_URL)}>
            所有模板
            <i style={{ fontSize: 12 }} className="icon iconfont icon-btn_fold" />
          </EasyvButton>
        )}
      </div>
    </div>
  );
}
