import {ISidebar} from '../interfaces/components/ISidebar';
import {ISidebarMenu} from '../interfaces/components/ISidebarMenu';
import {Factory} from '../Factory';

export class Sidebar implements ISidebar {

    private container:HTMLElement;

    private menu:ISidebarMenu;

    public setMenu(menu:ISidebarMenu)
    {
        this.menu = menu;
    }

    public init(container:HTMLElement)
    {
        this.container = container;
        let menuElement = this.container.querySelector('.js-sidebar-menu');
        this.menu.init(<HTMLElement>menuElement);
    }

}