import React, { Component } from 'react';
import './less/labor.less';

import LaborBasic from './LaborBasic';
import LaborNew from './LaborNew';

export default class LaborCompensation extends Component {
  constructor(props,context){
    super(props,context);
    this.state = {
      currentPage: 'LaborBasic',
      parma:''
    };
  }


  render() {

    let CurrentContent = LaborBasic;
    const variableComponent = this.state.currentPage;

    if (variableComponent === 'LaborNew') {
      CurrentContent = LaborNew;
    }

    if (variableComponent === 'LaborBasic') {
      CurrentContent = LaborBasic;
    }

    return (
      <CurrentContent
        parma={this.state.parma}
        setRoute={(parameter,parma) => {
        this.setState({
            currentPage: parameter,
            parma: parma,
          }
        );
      }} />
    );
  };
}



