import Component from './component.js'
import TbodyComponent from './tbody.js'
import TfootComponent from './tfoot.js'
import TheadComponent from'./thead.js'

export default class TableComponent extends Component {
  constructor(parent, selector) {
    if (selector) {
      super(parent, selector);
    } else {
      super(parent, 'table');
    }
  }

  get theadCo() {
    return new TheadComponent(this.currentPath);
  }

  get tbodyCo() {
    return new TbodyComponent(this.currentPath);
  }
  get tfootCo() {
    return new TfootComponent(this.currentPath);
  }

}