{"size": 1062, "ext": "js", "max_stars_repo_path": "src/components/AppContainer.js", "max_stars_repo_name": "hackathonovo/bilo-sta", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/AppContainer.js", "max_issues_repo_name": "hackathonovo/bilo-sta", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/AppContainer.js", "max_forks_repo_name": "hackathonovo/bilo-sta", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.9473684211, "max_line_length": 96, "alphanum_fraction": 0.6299435028}
import { Component } from 'react';

import Sidebar from './Sidebar';
import Content from './Content';
import Header from './Header';

const adminItems = {
  Raspoloživost: { subItems: ['Novi unos', 'Pregled'], icon: 'availability.png' },
  Prebivališta: { subItems: ['Novi unos', 'Pregled'], icon: 'location.png' },
  Spašavatelj: { subItems: ['Novi unos', 'Uređivanje'], icon: 'profile.png' },
  Akcije: { subItems: ['Uređivanje', 'Pregled'] , icon: 'action.png' },
  Šifrarnici: { subItems: ['Novi unos', 'Pregled'], icon: 'key.png' },
};

export default class AppContainer extends Component {
  constructor(props) {
    super(props);

    this.state = { item: 'Raspoloživost' };

    this.changeSidebarItem = this.changeSidebarItem.bind(this);
  }

  changeSidebarItem(item) {
    this.setState({ ...this.state, item });
  }

  render() {
    return (
      <div id="main">
        <Header />
        <Sidebar items={adminItems} click={this.changeSidebarItem} selected={this.state.item} />
        <Content view={this.state.item} />
      </div>
    );
  }
}
