import React from "react" import { View } from "react-native" import mitt from "mitt" import type { ReactotronCore, Plugin } from "reactotron-core-client" import FullScreenOverlay from "./overlay" export default function OverlayCreator() { return function overlay() { const emitter = mitt() return { /** * Fires when any Reactotron message arrives. */ onCommand: (command) => { if (command.type !== "overlay") return // relay this payload on to the emitter emitter.emit("overlay", command.payload) }, features: { overlay: (WrappedComponent: React.ComponentType) => (props: Record = {}) => ( ), }, } satisfies Plugin } } export type OverlayFeatures = ReturnType>["features"]