import React from "react" ; import { deepMemo } from "../../../../../../web/js/react/ReactUtils" ; const EPUBIFrameContext = React . createContext < HTMLIFrameElement > ( null ! ) ; interface IProps { readonly element : HTMLIFrameElement ; readonly children : React . ReactNode ; } export function useEPUBIFrameContext ( ) { return React . useContext ( EPUBIFrameContext ) ; } /**
 * Provides the context for the EPUB iframe that's being used.
 */ export const EPUBIFrameContextProvider = deepMemo ( ( props ) => ( < EPUBIFrameContext . Provider value = { props . element } > { props . children } < /EPUBIFrameContext.Provider>));