{"size": 2529, "ext": "js", "max_stars_repo_path": "app/components/_shared/Panel-Page/Panel-Page-component.js", "max_stars_repo_name": "Git-Together/GitTogether", "max_stars_repo_stars_event_min_datetime": "2016-10-14T21:09:48.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-20T18:07:45.000Z", "max_issues_repo_path": "app/components/_shared/Panel-Page/Panel-Page-component.js", "max_issues_repo_name": "Git-Together/GitTogether", "max_issues_repo_issues_event_min_datetime": "2016-11-30T16:41:23.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-09T21:11:56.000Z", "max_forks_repo_path": "app/components/_shared/Panel-Page/Panel-Page-component.js", "max_forks_repo_name": "Git-Together/GitTogether", "max_forks_repo_forks_event_min_datetime": "2016-10-17T15:46:20.000Z", "max_forks_repo_forks_event_max_datetime": "2016-11-21T17:08:04.000Z"}
{"max_stars_count": 3, "max_issues_count": 2, "max_forks_count": 3, "avg_line_length": 33.2763157895, "max_line_length": 204, "alphanum_fraction": 0.6283115856}
import React, { Component, PropTypes } from 'react';
import Panel from '../Panel/Panel-component.js';
import Page from '../Page/Page-component.js';
import PageRepo from '../Page/PageRepo-component.js';
import PageChat from '../Page/PageChat-component.js';

import './Panel-Page.scss';

export default class PanelPage extends Component {
  constructor (props) {
    super(props);
    this.state = {
    }
  }

  static propTypes = {

  };

  render() {
	  let isChat = this.props.uiSelected === "chat"
	  let isRepo = this.props.uiSelected === "repo"
    return (
		<div className="Panel-Page">
			<Panel icon={this.props.icon} toggleComponent={this.props.toggleComponent} state={this.props.state} currentUi={this.props.currentUi} isRepo={this.props.isRepo} panelMessage={this.props.panelMessage} />
			{this.props.uiSelected===this.props.currentUi && isRepo && !isChat && <PageRepo
				list={this.props.list}
				selected={this.props.selected}
				icon={this.props.icon}
			/>}

			{this.props.uiSelected===this.props.currentUi && !isRepo && isChat && <PageChat
				selected={this.props.selected}
				icon={this.props.icon}
			/>}

			{this.props.uiSelected===this.props.currentUi && !isChat && !isRepo && <Page
				list={this.props.list}
				selected={this.props.selected}
				icon={this.props.icon}
				changeSelected={this.props.changeSelected}
				addSelected={this.props.addSelected}
				removeSelected={this.props.removeSelected}
				getList = {this.props.getList}
				channelName = {this.props.channelName}
			/>}

	</div>
	)
    // return (
    //   <div className="Panel-Page">
    //     <Panel icon={this.props.icon}  state={this.props.state} currentUi={this.props.currentUi} isRepo={this.props.isRepo} panelMessage={this.props.panelMessage} />
    //     {this.props.uiSelected===this.props.currentUi && this.props.repo && <PageRepo
    //           list={this.props.list}
    //           selected={this.props.selected}
    //           icon={this.props.icon}
    //     />}

    //     {this.props.uiSelected===this.props.currentUi && !this.props.repo &&<Page
    //           list={this.props.list}
    //           selected={this.props.selected}
    //           icon={this.props.icon}
    //           changeSelected={this.props.changeSelected}
    //           addSelected={this.props.addSelected}
    //           removeSelected={this.props.removeSelected}
    //           getList = {this.props.getList}
    //           channelName = {this.props.channelName}
    //     />}

    //   </div>
    // )
  }
}


