'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const core = require('./core-1276587e.js');

const App = class {
    constructor(hostRef) {
        core.registerInstance(this, hostRef);
    }
    componentDidLoad() {
        if (core.Build.isBrowser) {
            rIC(() => {
                const isHybrid = core.isPlatform(window, 'hybrid');
                if (!core.config.getBoolean('_testing')) {
                    new Promise(function (resolve) { resolve(require('./tap-click-9724c236.js')); }).then(module => module.startTapClick(core.config));
                }
                if (core.config.getBoolean('statusTap', isHybrid)) {
                    new Promise(function (resolve) { resolve(require('./status-tap-30d68c51.js')); }).then(module => module.startStatusTap());
                }
                if (core.config.getBoolean('inputShims', needInputShims())) {
                    new Promise(function (resolve) { resolve(require('./input-shims-e6f33c96.js')); }).then(module => module.startInputShims(core.config));
                }
                if (core.config.getBoolean('hardwareBackButton', isHybrid)) {
                    new Promise(function (resolve) { resolve(require('./hardware-back-button-de3d25be.js')); }).then(module => module.startHardwareBackButton());
                }
                new Promise(function (resolve) { resolve(require('./focus-visible-7d421f9b.js')); }).then(module => module.startFocusVisible());
            });
        }
    }
    render() {
        const mode = core.getIonMode(this);
        return (core.h(core.Host, { class: {
                [mode]: true,
                'ion-page': true,
                'force-statusbar-padding': core.config.getBoolean('_forceStatusbarPadding')
            } }));
    }
    get el() { return core.getElement(this); }
    static get style() { return "html.plt-mobile ion-app {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\nion-app.force-statusbar-padding {\n  --ion-safe-area-top: 20px;\n}"; }
};
const needInputShims = () => {
    return core.isPlatform(window, 'ios') && core.isPlatform(window, 'mobile');
};
const rIC = (callback) => {
    if ('requestIdleCallback' in window) {
        window.requestIdleCallback(callback);
    }
    else {
        setTimeout(callback, 32);
    }
};

exports.ion_app = App;
