2022-07-20 08:00:02 +00:00
|
|
|
import { DeepReadonly, InjectionKey, Ref } from 'vue'
|
2022-07-26 09:51:19 +00:00
|
|
|
import DialogBox from '@/components/ui/DialogBox.vue'
|
2022-07-26 13:59:46 +00:00
|
|
|
import MessageToaster from '@/components/ui/MessageToaster.vue'
|
2022-06-10 10:47:46 +00:00
|
|
|
|
2022-09-08 05:06:49 +00:00
|
|
|
export interface ReadonlyInjectionKey<T> extends InjectionKey<[Readonly<T> | DeepReadonly<T>, Closure]> {
|
|
|
|
}
|
2022-07-10 15:17:48 +00:00
|
|
|
|
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
|
|
|
|
2022-07-21 07:54:36 +00:00
|
|
|
export const SongListTypeKey: ReadonlyInjectionKey<SongListType> = Symbol('SongListType')
|
2022-07-20 08:00:02 +00:00
|
|
|
export const SongsKey: ReadonlyInjectionKey<Ref<Song[]>> = Symbol('Songs')
|
|
|
|
export const SelectedSongsKey: ReadonlyInjectionKey<Ref<Song[]>> = Symbol('SelectedSongs')
|
|
|
|
export const SongListConfigKey: ReadonlyInjectionKey<Partial<SongListConfig>> = Symbol('SongListConfig')
|
|
|
|
export const SongListSortFieldKey: ReadonlyInjectionKey<Ref<SongListSortField>> = Symbol('SongListSortField')
|
|
|
|
export const SongListSortOrderKey: ReadonlyInjectionKey<Ref<SortOrder>> = Symbol('SongListSortOrder')
|
2022-07-10 15:17:48 +00:00
|
|
|
|
2022-07-20 08:00:02 +00:00
|
|
|
export const EditSongFormInitialTabKey: ReadonlyInjectionKey<Ref<EditSongFormTabName>> = Symbol('EditSongFormInitialTab')
|
|
|
|
|
|
|
|
export const PlaylistKey: ReadonlyInjectionKey<Ref<Playlist>> = Symbol('Playlist')
|
2022-08-10 14:56:01 +00:00
|
|
|
export const PlaylistFolderKey: ReadonlyInjectionKey<Ref<PlaylistFolder>> = Symbol('PlaylistFolder')
|
2022-07-20 08:00:02 +00:00
|
|
|
export const UserKey: ReadonlyInjectionKey<Ref<User>> = Symbol('User')
|