import { getViewMode , ViewModeNext , ViewModeNormal , ViewModePresenter , } from '../utils' ; import nextView from './next-view' ; import normalView from './normal-view' ; import presenterView from './presenter-view' ; const bespokePresenter = ( target ) => { const mode = getViewMode ( ) ; if ( mode === ViewModeNext ) target . appendChild ( document . createElement ( 'span' ) ) ; return { [ ViewModeNormal ] : normalView , [ ViewModePresenter ] : presenterView , [ ViewModeNext ] : nextView , } [ mode ] ; } ; export default bespokePresenter ;