import React from 'react';
import {inject, observer} from 'mobx-react';
import {Router, Route, browserHistory} from 'react-router';
import {Breadcrumb, Alert} from 'antd';
import {LINKS} from "../../routes";
import {HashRouter, Link} from 'react-router-dom';

@inject('appstate')
@observer
export default class BreadcrumbComponent extends React.Component {
  constructor(props) {
    super(props);
    this.props = props;
    this.state = {};
    this.defaultState = Object.assign({}, this.state);
  }

  componentDidMount() {
    console.log(this.props.history, "breadcumb")
  }

  render() {
    const Apps = () => (
      <ul className="app-list">
        <li>
          <Link to="/apps/1">Application1</Link>：<Link to="/apps/1/detail">Detail</Link>
        </li>
        <li>
          <Link to="/apps/2">Application2</Link>：<Link to="/apps/2/detail">Detail</Link>
        </li>
      </ul>
    );

    const Home = ({routes, params, children}) => (
      <div className="demo">
        <div className="demo-nav">
          <Link to="/">Home</Link>
          <Link to="/apps">Application List</Link>
        </div>
        {children || 'Home Page'}
        <Alert style={{margin: '16px 0'}} message="Click the navigation above to switch:"/>
        <Breadcrumb routes={routes} params={params} linkRender=""  nameRender=""/>
      </div>
    );
    return (
      <div className="breadcrumb">
        {/*<Home/>*/}
      </div>
    )
  }
}
