
declare const RF;
declare const alertEx;


import './menu.scss';

@RF.decorateComponent({
    name: 'app-menu',
    template: require('./menu.html')
})
export class Menu {
    requestFullScreen(){
        let element:any = document.querySelector('.screen');;
        if(element.requestFullScreen) {
            element.requestFullScreen();
        } else if(element.mozRequestFullScreen) {
            element.mozRequestFullScreen();
        } else if(element.webkitRequestFullScreen) {
            element.webkitRequestFullScreen();
        } else {
            alertEx('Не поддерживается на данном устройстве');           
        }
    }

    cancelFullScreen(){
        let doc = document as any;
        if(doc.cancelFullScreen) {
            doc.cancelFullScreen();
        } else if(doc.mozCancelFullScreen) {
            doc.mozCancelFullScreen();
        } else if(doc.webkitCancelFullScreen) {
            doc.webkitCancelFullScreen();
        }
    }
}