2022-07-20 08:00:02 +00:00
|
|
|
import { DeepReadonly, InjectionKey, Ref } from 'vue'
|
2022-11-19 18:04:21 +00:00
|
|
|
import Overlay from '@/components/ui/Overlay.vue'
|
2022-07-26 09:51:19 +00:00
|
|
|
import DialogBox from '@/components/ui/DialogBox.vue'
|
2024-04-04 22:20:42 +00:00
|
|
|
import MessageToaster from '@/components/ui/message-toaster/MessageToaster.vue'
|
2022-10-08 10:54:25 +00:00
|
|
|
import Router from '@/router'
|
2022-06-10 10:47:46 +00:00
|
|
|
|
2022-11-08 19:35:18 +00:00
|
|
|
export type ReadonlyInjectionKey<T> = InjectionKey<[Readonly<T> | DeepReadonly<T>, Closure]>
|
2022-07-10 15:17:48 +00:00
|
|
|
|
2022-10-08 10:54:25 +00:00
|
|
|
export const RouterKey: InjectionKey<Router> = Symbol('Router')
|
2022-11-19 18:04:21 +00:00
|
|
|
export const OverlayKey: InjectionKey<Ref<InstanceType<typeof Overlay>>> = Symbol('Overlay')
|
2022-07-26 09:51:19 +00:00
|
|
|
export const DialogBoxKey: InjectionKey<Ref<InstanceType<typeof DialogBox>>> = Symbol('DialogBox')
|
2022-07-26 13:59:46 +00:00
|
|
|
export const MessageToasterKey: InjectionKey<Ref<InstanceType<typeof MessageToaster>>> = Symbol('MessageToaster')
|
2022-07-26 09:51:19 +00:00
|
|
|
|
2024-05-19 05:49:42 +00:00
|
|
|
export const PlayablesKey: ReadonlyInjectionKey<Ref<Playable[]>> | InjectionKey<Ref<Playable[]>> = Symbol('Playables')
|
|
|
|
export const CurrentPlayableKey: InjectionKey<Ref<Playable | undefined>> = Symbol('CurrentPlayable')
|
|
|
|
export const SelectedPlayablesKey: ReadonlyInjectionKey<Ref<Playable[]>> = Symbol('SelectedPlayables')
|
|
|
|
export const PlayableListConfigKey: ReadonlyInjectionKey<Partial<PlayableListConfig>> = Symbol('SongListConfig')
|
|
|
|
export const PlayableListSortFieldKey: ReadonlyInjectionKey<Ref<PlayableListSortField>> = Symbol('SongListSortField')
|
2022-07-20 08:00:02 +00:00
|
|
|
export const SongListSortOrderKey: ReadonlyInjectionKey<Ref<SortOrder>> = Symbol('SongListSortOrder')
|
2022-12-17 12:09:22 +00:00
|
|
|
export const SongListFilterKeywordsKey: InjectionKey<Ref<string>> = Symbol('SongListFilterKeywords')
|
2024-05-19 05:49:42 +00:00
|
|
|
export const PlayableListContextKey: InjectionKey<Ref<PlayableListContext>> = Symbol('SongListContext')
|
2022-07-10 15:17:48 +00:00
|
|
|
|
2022-11-27 15:29:29 +00:00
|
|
|
export const ModalContextKey: InjectionKey<Ref<Record<string, any>>> = Symbol('ModalContext')
|