/// <reference path="./sigApi.ApiBase.d.ts" />
/// <reference path="./sigApi.BrowserInfo.d.ts" />

declare namespace SigApi {
    interface ApiBrowser extends ApiBase {
        /**
         * Checks, if the current browser is supported or not.
         * 
         * @param {boolean} showErrorWindow if true, an error window is displayed if the current browser is not supported
         * @returns {object} object {supported: `boolean`, name: `string`, version: `string`, errortxt: `string`}
         * 
         * supported: true, if the current browser is supported, otherwise false
         * 
         * name: the name of the current browser (e.g. 'Chrome')
         * 
         * version: the version of the current browser (e.g. '83.0.4103.106')
         * 
         * errortxt: an text, which describes the error that has occurred
         */
        isCurrentBrowserSupported(showErrorWindow: boolean): { supported: boolean, name?: string, version?: string, errortxt?: string }
        /**
         * Gets the current browser info.
         * 
         * @returns {BrowserInfo} The BrowserInfo object or undefined if no BrowserInfo was found
         */
        getCurrentBrowserInfo(): BrowserInfo | null
        /**
         * Gets the parsed result of the bowser library (see https://github.com/lancedikson/bowser)
         * 
         * @returns {Parser.ParsedResult} see https://github.com/lancedikson/bowser/blob/master/index.d.ts
         */
        getCurrentBrowser(): any
        /**
         * Returns the screenmode in which the app is running.
         * @returns {string|undefined} Returns "browser", "minimal-ui", "standalone" or "fullscreen".
         * 
         * If the screenmode could not be detected, undefined will be returned.
         */
        getScreenMode(): string | undefined
        /**
         * Returns whether the component is shown on a mobile device or not.
         * 
         * @returns {boolean} True, if the component is shown on a mobile device.
         */
        isMobile(): boolean
        /**
         * Returns whether the component is shown on a android mobile device or not.
         * 
         * @returns {boolean} True, if the component is shown on a android mobile device.
         */
        isAndroidMobile(): boolean
        /**
         * Returns whether the component is shown on a apple mobile device or not.
         * 
         * @returns {boolean} True, if the component is shown on a apple mobile device.
         */
        isAppleMobile(): boolean
        /**
         * Returns whether the viewport is currently in landscape orientation or not.
         * 
         * @returns {boolean} True, if the viewport is currently in landscape orientation.
         */
        isLandscape(): boolean
        /**
         * Returns whether the viewport is currently in portrait orientation or not.
         * 
         * @returns {boolean} True, if the viewport is currently in portrait orientation.
         */
        isPortrait(): boolean
        /**
         * Returns true if Chrome browser is used, false otherwise.
         * 
         * @returns {boolean} True, if the chrome browser is used.
         */
        isChrome(): boolean
        /**
         * Returns true if Safari browser is used, false otherwise.
         * 
         * @returns {boolean} True, if the Safari browser is used.
         */
        isSafari(): boolean
        /**
         * Returns true if Firefox browser is used, false otherwise.
         * 
         * @returns {boolean} True, if the Firefox browser is used.
         */
        isFirefox(): boolean
        /**
         * Returns true if the browser runs on iPhone, false otherwise.
         * 
         * @returns {boolean} True, if a browser on iphone is used.
         */
        isiPhone(): boolean
        /**
         * Returns true if the browser runs on iPad, false otherwise.
         * 
         * @returns {boolean} True, if a browser on iPad is used.
         */
        isiPad(): boolean
        /**
         * Function to check if parameter object is a instanceof BrowserInfo.
         * This function can be used without importing the type BrowserInfo to be used with the instanceof operator.
         * @param {*} object Any object to type check
         * @returns {boolean} Returns true if parameter object is instanceof BrowserInfo, else false
         */
        instanceofBrowserInfo(object: any): boolean
    }
}
