import type * as d from '../declarations' ; import { getHostRef , modeResolutionChain } from '@platform' ; export const computeMode = ( elm ) => modeResolutionChain . map ( ( h ) => h ( elm ) ) . find ( ( m ) => ! ! m ) ; export const setMode = ( handler ) => modeResolutionChain . push ( handler ) ; export const getMode = ( ref ) => getHostRef ( ref ) . $modeName$ ;