import React from 'react';
import './index.less';
import Page from '@src/containers/Page';
import Continue from '../../../components/Continue';
import Tabs from '../../../components/Tabs';
import Module from '../../../components/Module';
import Division from '../../../components/Division';
import Panel from '../../../components/Panel';
import Card from '../../../components/Card';
import List from '../../../components/List';
import ListTable from '../../../components/ListTable';
import ProgressText from '../../../components/ProgressText';
import IconButton from '../../../components/IconButton';
import Step from '../../../components/Step';

export default class extends Page {
  renderView() {
    return (
      <div>
        <Continue date={'2019-04-29 16:30'} data={{}} />
        <div className="content">
          <Module className="m-t-2">
            <Tabs
              type="card"
              active="main"
              tabs={[
                { key: 'main', name: '首页', path: '/' },
                { key: 'ready', name: 'GetReady', path: '/' },
                { key: 'exercise', name: '练习', path: '/' },
                { key: 'cat', name: 'CAT模考', path: '/' },
                { key: 'item', name: '题库', path: '/' },
                { key: 'machine', name: '换库&机经', path: '/' },
              ]}
            />
            <Tabs
              active="main"
              tabs={[
                { key: 'main', name: '首页', path: '/' },
                { key: 'ready', name: 'GetReady', path: '/' },
                { key: 'exercise', name: '练习', path: '/' },
                { key: 'cat', name: 'CAT模考', path: '/' },
                { key: 'item', name: '题库', path: '/' },
              ]}
            />
          </Module>
          <Module>
            <Tabs
              active="main"
              border
              width="180px"
              space="0"
              tabs={[
                { key: 'main', name: '首页', path: '/' },
                { key: 'ready', name: 'GetReady', path: '/' },
                { key: 'exercise', name: '练习', path: '/' },
                { key: 'cat', name: 'CAT模考', path: '/' },
                { key: 'item', name: '题库', path: '/' },
              ]}
            />
            <Tabs
              active="main"
              type="text"
              tabs={[
                { key: 'main', name: '首页', path: '/' },
                { key: 'ready', name: 'GetReady', path: '/' },
                { key: 'exercise', name: '练习', path: '/' },
                { key: 'cat', name: 'CAT模考', path: '/' },
                { key: 'item', name: '题库', path: '/' },
              ]}
            />
          </Module>
          <Module>
            <Step
              list={[
                '「1」前言',
                '「2」重新认识',
                '「3」基本元素',
                '「4」简单变长',
                '「5」练习',
                '「6」翻译',
                '「7」附录',
              ]}
              step="4"
            />
          </Module>
          <Division col="2">
            <Panel
              title="OG"
              col="3"
              list={[{ progress: 10, title: '测试' }, { progress: 10, title: '测试' }, { progress: 0, title: '测试' }]}
            />
            <Panel
              title="OG"
              col="4"
              list={[{ progress: 10, title: '测试' }, { progress: 10, title: '测试' }, { progress: 10, title: '测试' }]}
            />
          </Division>
          <Division col="3">
            <Card title="句改 SC" data={{ status: 'buy', desc: ['名师讲解', '精进学习', '提升成绩'] }} />
            <Card title="句改 SC" data={{ status: 'open' }} />
            <Card
              title="句改 SC"
              data={{
                status: 'ing',
                list: [
                  { progress: 30, date: '2019-04-22', status: 'start' },
                  { progress: 40, date: '2019-04-22', status: 'ing' },
                ],
              }}
            />
            <Card title="句改 SC" data={{ status: 'ing', list: [] }} />
            <Card title="句改 SC" data={{ status: 'end' }} />
          </Division>
          <List
            title="Chapter4"
            subTitle="简单句如何变长难句"
            list={[{ progress: 30, title: '什么样的句子叫长难句，长难句的基本特征。', part: 'Part 1' }]}
          />
          <ListTable
            title="Chapter5"
            subTitle="练习"
            filters={[
              { type: 'radio', checked: 'first', list: [{ key: 'first', title: 123 }, { key: 'two', title: 321 }] },
              { type: 'select', checked: 'first', list: [{ key: 'first', title: 123 }, { key: 'two', title: 321 }] },
            ]}
            data={[{}]}
            columns={[
              {
                title: '练习册',
                width: 250,
                align: 'left',
                render: () => {
                  return (
                    <div className="table-row">
                      <div className="night f-s-16">OG18 综合：第1-20题</div>
                      <div>
                        <ProgressText progress="30" size="small" />
                      </div>
                    </div>
                  );
                },
              },
              {
                title: '正确率',
                width: 150,
                align: 'left',
                render: () => {
                  return (
                    <div className="table-row">
                      <div className="night f-s-16 f-w-b">--</div>
                      <div className="f-s-12">全站55%</div>
                    </div>
                  );
                },
              },
              {
                title: '全站用时',
                width: 150,
                align: 'left',
                render: () => {
                  return (
                    <div className="table-row">
                      <div className="night f-s-16 f-w-b">55%</div>
                      <div className="f-s-12">全站56s</div>
                    </div>
                  );
                },
              },
              {
                title: '最近做题',
                width: 150,
                align: 'left',
                render: () => {
                  return (
                    <div className="table-row">
                      <div>2019-04-28</div>
                      <div>07:30</div>
                    </div>
                  );
                },
              },
              {
                title: '操作',
                width: 180,
                align: 'left',
                render: () => {
                  return (
                    <div className="table-row p-t-1">
                      <IconButton className="m-r-2" type="continue" tip="Continue" />
                      <IconButton type="restart" tip="Restart" />
                    </div>
                  );
                },
              },
              {
                title: '报告',
                width: 30,
                align: 'right',
                render: () => {
                  return (
                    <div className="table-row p-t-1">
                      <IconButton type="report" tip="Report" />
                    </div>
                  );
                },
              },
            ]}
          />
        </div>
      </div>
    );
  }
}
