{"size": 978, "ext": "js", "max_stars_repo_path": "lib/tardis-view.js", "max_stars_repo_name": "dabrorius/atom-tardis", "max_stars_repo_stars_event_min_datetime": "2019-07-23T19:46:12.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-23T19:46:12.000Z", "max_issues_repo_path": "lib/tardis-view.js", "max_issues_repo_name": "dabrorius/atom-tardis", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/tardis-view.js", "max_forks_repo_name": "dabrorius/atom-tardis", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.2272727273, "max_line_length": 70, "alphanum_fraction": 0.6717791411}
'use babel';

export default class TardisView {

  constructor(serializedState) {
    this.element = document.createElement('div');
    this.element.classList.add('tardis');

    const root = document.createElement('div');
    const filePath = document.createElement('ul');
    filePath.setAttribute('id', 'filePath')

    this.element.appendChild(root);
    root.appendChild(filePath);

    filePath.textContent = "/?"
  }

  setPath(path) {
    let pathContainer = document.getElementById('filePath')
    pathContainer.innerHTML = ''
    let pathElements = path.split('/')
    pathElements.forEach(pathElement => {
      let pathPill = document.createElement('li')
      pathPill.textContent = pathElement
      filePath.appendChild(pathPill)
    })

  }

  // Returns an object that can be retrieved when package is activated
  serialize() {}

  // Tear down any state and detach
  destroy() {
    this.element.remove();
  }

  getElement() {
    return this.element;
  }

}
