import React from 'react';
import { Layout, Menu, Breadcrumb, Icon, Tabs, Collapse } from 'antd';
const { Header, Content, Sider } = Layout;
const CollapsePanel = Collapse.Panel;
const { TabPane } = Tabs;
const SubMenu = Menu.SubMenu;
import './layout.less';
import ChartDesignerHeader from './header';
import ChartDesignerContent from './content';
import chartOption from '../../data/charts/option/data1.json';

class ChartDesignerLayout extends React.Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }

    render() {
        let viewType = 'dataView';
        let note = '测试描述...';
        let currentDataSource = 'd1';
        let accessPermission = 'anyone';
        let editPermission = 'owner';
        let showLegend = true;
        let showTooltip = true;
        let datazoom = true;
        let toolbox = true;

        let baseConfig = { viewType, note, currentDataSource, accessPermission, editPermission, showLegend,
            showTooltip, datazoom, toolbox
        };
        let preparingConfig = { groupBy: ['c3'] };

        return <Layout>
            <Header>
                <ChartDesignerHeader />
            </Header>
            <Content>
                <ChartDesignerContent baseConfig={baseConfig} preparingConfig={preparingConfig} chartOption={chartOption}/>
            </Content>
        </Layout>
    }
}

export default ChartDesignerLayout;