import type { Locale } from 'zhin.js/i18n'; import { definePluginStore } from 'zhin.js'; import type { LotteryConfig } from './config.js'; import type { LotteryDb } from './db.js'; import type { GameId } from './types.js'; export interface LotteryRuntime { readonly locale?: Locale; readonly db: LotteryDb; readonly config: Readonly; readonly enabledGames: readonly GameId[]; readonly outbound: ((text: string) => Promise) | null; } export const lotteryRuntimeStore = definePluginStore( 'zhin.lottery.runtime', 'Owner-scoped Lottery runtime', ); export const lotteryRuntimeToken = lotteryRuntimeStore;