import type { InjectionKey } from 'vue'
import { StudyPlan, StudyPlanStats } from './study';
import { Study, Transfer, University, Voluntary, Major } from '.';
import { useExam } from '@/composables/useExam';

/**
 * 打开知识点记录详情
 */
export const OPEN_KNOWLEDGE_DETAIL = Symbol('OPEN_KNOWLEDGE_DETAIL') as InjectionKey<(id: number, name: string) => void>;

/**
 * 打开刷题记录详情
 */
export const OPEN_PRACTICE_DETAIL = Symbol('OPEN_PRACTICE_DETAIL') as InjectionKey<(id: number, name: string) => void>;

/**
 * 打开视频记录详情
 */
export const OPEN_VIDEO_DETAIL = Symbol('OPEN_VIDEO_DETAIL') as InjectionKey<(id: number, name: string) => void>;


export const EXAM_AUTO_SUBMIT = Symbol('EXAM_AUTO_SUBMIT') as InjectionKey<() => void>;
export const EXAM_PAGE_OPTIONS = Symbol('EXAM_PAGE_OPTIONS') as InjectionKey<Transfer.ExamAnalysisPageOptions>;
export const EXAM_DATA = Symbol('EXAM_DATA') as InjectionKey<ReturnType<typeof useExam>>;
/**
 * 学习计划
 */
export const STUDY_PLAN = Symbol('STUDY_PLAN') as InjectionKey<Ref<StudyPlan>>;
/**
 * 学习计划统计数据
 */
export const STUDY_PLAN_STATS = Symbol('STUDY_PLAN_STATS') as InjectionKey<Ref<StudyPlanStats>>;


/**
 * 打开VIP弹窗
 */
export const OPEN_VIP_POPUP = Symbol('OPEN_VIP_POPUP') as InjectionKey<() => void>;

/**
 * 关闭VIP弹窗
 */
export const CLOSE_VIP_POPUP = Symbol('CLOSE_VIP_POPUP') as InjectionKey<() => void>;

/*
* 计算录取概率
* */
export const VOLUNTARY_TARGET = Symbol('VOLUNTARY_TARGET') as InjectionKey<Ref<Study.SelectedUniversityMajor>>
export const VOLUNTARY_RULES = Symbol('VOLUNTARY_RULES') as InjectionKey<Ref<Voluntary.EnrollRule[]>>
export const VOLUNTARY_MODEL = Symbol('VOLUNTARY_MODEL') as InjectionKey<Ref<Voluntary.VoluntaryModel>>
export const VOLUNTARY_RESULT = Symbol('VOLUNTARY_RESULT') as InjectionKey<Ref<Voluntary.VoluntaryResult>>

export const UNIVERSITY_FILTER = Symbol('UNIVERSITY_FILTER') as InjectionKey<Ref<University.UniversityQueryDto>>
export const VOLUNTARY_SORTING = Symbol('VOLUNTARY_SORTING') as InjectionKey<Ref<boolean>>

export const UNIVERSITY_DETAIL = Symbol('UNIVERSITY_DETAIL') as InjectionKey<Ref<University.UniversityDetail>>
export const MAJOR_TREE = Symbol('MAJOR_TREE') as InjectionKey<Ref<Major.MajorItem[]>>