import { RealtimeEditMode } from './RuntimeBot' ; /**
 * The default realtime edit mode.
 */ export const DEFAULT_REALTIME_EDIT_MODE = RealtimeEditMode . Immediate ; /**
 * A map between space types and the realtime edit modes they should use.
 */ export type SpaceRealtimeEditModeMap = Map < string , RealtimeEditMode > ; /**
 * The default map between bot spaces and realtime edit modes.
 */ export const DEFAULT_SPACE_REALTIME_EDIT_MODE_MAP = new Map ( [ [ 'shared' , RealtimeEditMode . Immediate ] , [ 'local' , RealtimeEditMode . Immediate ] , [ 'tempLocal' , RealtimeEditMode . Immediate ] , [ 'history' , RealtimeEditMode . Delayed ] , [ 'admin' , RealtimeEditMode . Delayed ] , [ 'certified' , RealtimeEditMode . None ] , [ 'bootstrap' , RealtimeEditMode . None ] , ] ) ; param map param space export function getRealtimeEditMode ( map , space ) { return map . get ( space ) || DEFAULT_REALTIME_EDIT_MODE ; } /**
 * Defines an interface for an object that is able to provide realtime edit modes for a particular partition key.
 */ export interface AuxRealtimeEditModeProvider { param space getEditMode ( space ) : RealtimeEditMode ; } export class DefaultRealtimeEditModeProvider implements AuxRealtimeEditModeProvider { private _map : SpaceRealtimeEditModeMap ; constructor ( map = DEFAULT_SPACE_REALTIME_EDIT_MODE_MAP ) { this . _map = map ; } getEditMode ( space ) { return getRealtimeEditMode ( this . _map , space ) ; } }