//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// TypeScript support for Blazor-WASM application | Author: Sergei Y.Kitaev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// App.configuration etc. (static class):
class App {
    static IsDebugConfiguration() {
        return App._IsDebugConfiguration_;
    }
    static IsReleaseConfiguration() {
        return !App.IsDebugConfiguration();
    }
    static SpecifyIsDebugConfiguration() {
        App._IsDebugConfiguration_ = true;
    }
    static Window_OnFocus() {
        ServiceDialogFrame.HandleEarly_Window_OnFocus();
        WASM.Invoke('wasm_App_FocusChanged');
        WASM.AsyncInvoke('wasm_App_FocusChanged_A');
        ServiceDialogFrame.HandleLate_Window_OnFocus();
    }
    static Window_OnBlur() {
        // Deferred focus blur (because non-deferred one is impossible in .NET 5.0).
        setTimeout(() => { WASM.Invoke('wasm_App_FocusBlur'); });
        setTimeout(() => { WASM.AsyncInvoke('wasm_App_FocusBlur_A'); });
    }
    static Window_OnKeyDown(e) {
        DotNet.invokeMethod(WASM.AssemblyName(), 'wasm_App_OnKeyDown', e.altKey, e.code, e.ctrlKey, e.key, e.location, e.metaKey, e.repeat, e.shiftKey, e.type);
        DotNet.invokeMethodAsync(WASM.AssemblyName(), 'wasm_App_OnKeyDown_A', e.altKey, e.code, e.ctrlKey, e.key, e.location, e.metaKey, e.repeat, e.shiftKey, e.type);
    }
    static Window_OnKeyUp(e) {
        DotNet.invokeMethod(WASM.AssemblyName(), 'wasm_App_OnKeyUp', e.altKey, e.code, e.ctrlKey, e.key, e.location, e.metaKey, e.repeat, e.shiftKey, e.type);
        DotNet.invokeMethodAsync(WASM.AssemblyName(), 'wasm_App_OnKeyUp_A', e.altKey, e.code, e.ctrlKey, e.key, e.location, e.metaKey, e.repeat, e.shiftKey, e.type);
    }
} // App
App._IsDebugConfiguration_ = false;
//==================================================================================================
// APP.CONFIGURATION ETC. — FUNCTIONS:
//--------------------------------------------------------------------------------------------------
function App_SpecifyIsDebugConfiguration() {
    App.SpecifyIsDebugConfiguration();
}
function App_RegisterEvents() {
    window.addEventListener('focus', App.Window_OnFocus, true);
    window.addEventListener('blur', App.Window_OnBlur, true);
    // window.addEventListener('input', App.Window_OnInput, true)
    window.addEventListener('keydown', App.Window_OnKeyDown, true);
    window.addEventListener('keyup', App.Window_OnKeyUp, true);
    //window.addEventListener('', App.Window_On..., true)
}
//==================================================================================================
//# sourceMappingURL=App.js.map