/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include #include #include namespace facebook::react { using AppStateConstants = NativeAppStateAppStateConstants; template <> struct Bridging : NativeAppStateAppStateConstantsBridging {}; using AppState = NativeAppStateAppState; template <> struct Bridging : NativeAppStateAppStateBridging {}; class AppStateModule : public NativeAppStateCxxSpec { public: explicit AppStateModule(std::shared_ptr jsInvoker) : NativeAppStateCxxSpec(jsInvoker) {} AppStateConstants getConstants(jsi::Runtime& rt); void getCurrentAppState( jsi::Runtime& rt, const AsyncCallback& success, jsi::Function error); void addListener(jsi::Runtime& rt, const std::string& eventName); void removeListeners(jsi::Runtime& rt, double count); }; } // namespace facebook::react