UNPKG

@wener/console

Version:

Base console UI toolkit

26 lines (25 loc) 753 B
import { ConsoleEvents, getConsoleContext } from "../context.js"; export function getUserAction() { const emitter = getConsoleContext().getEmitter(); const emit = emitter.emit.bind(emitter); return { refreshProfile: () => { return emit(ConsoleEvents.RefreshProfile, {}); }, signIn: () => { return emit(ConsoleEvents.SignIn, {}); }, signOut: () => { return emit(ConsoleEvents.SignOut, {}); }, lock: () => { return emit(ConsoleEvents.Lock, {}); }, unlock: (options) => { return emit(ConsoleEvents.Unlock, { ...options }); } }; } //# sourceMappingURL=getUserAction.js.map