UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

38 lines (35 loc) • 1.14 kB
import { NitroModules } from "react-native-nitro-modules"; import { rethrowNativeError } from "../nativeError.native.js"; import { assertQuickActionItems, assertQuickActionListener } from "./validate.native.js"; var hybrid; function native() { hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = NitroModules.createHybridObject("OneQuickActions"); return hybrid; } function setItems(items) { assertQuickActionItems(items); return native().setItems(items).catch(rethrowNativeError); } function getItems() { return native().getItems().catch(rethrowNativeError); } function getInitialAction() { var _native_getInitialAction; return (_native_getInitialAction = native().getInitialAction()) !== null && _native_getInitialAction !== void 0 ? _native_getInitialAction : null; } function clearInitialAction() { native().clearInitialAction(); } function addListener(listener) { assertQuickActionListener(listener); return native().addListener(listener); } var QuickActions = Object.freeze({ setItems, getItems, getInitialAction, clearInitialAction, addListener }); export { QuickActions }; //# sourceMappingURL=index.native.js.map