import {IAppContainer} from '../interfaces/components/IAppContainer';
import {IAdminForm} from '../interfaces/components/IAdminForm';

export class AppContainer implements IAppContainer {

    protected container:HTMLElement;

    protected adminForm:IAdminForm;

    public setAdminForm(form:IAdminForm): void
    {
        this.adminForm = form;
    }

    public getAdminForm(): IAdminForm
    {
        return this.adminForm;
    }

    public init(container:HTMLElement): void
    {
        this.container = container;
        let adminForm = this.container.querySelector('.js-form');
        this.adminForm.init(<HTMLElement>adminForm);
    }

}