/**
 * student-portal GraphQL 层 barrel exports（ai14）
 *
 * 统一导出 GraphQL client、Provider、类型、操作字符串、Hooks。
 * 业务组件通过 `@/lib/graphql` 统一引入。
 *
 * 导出分类：
 * - client：createStandaloneClient, getGraphQLClient, resetGraphQLClient, isMfMode
 * - provider：GraphQLProvider, StandaloneGraphQLProvider
 * - types：ActionState, ActionError, 所有实体类型, 错误码常量
 * - operations：所有 gql tagged 操作字符串
 * - hooks：所有 24 个 React Hooks
 */

// client
export {
  createStandaloneClient,
  getGraphQLClient,
  resetGraphQLClient,
  isMfMode,
} from "./client";

// provider
export { GraphQLProvider, StandaloneGraphQLProvider } from "./provider";
export type { GraphQLProviderProps } from "./provider";

// types
export type {
  ActionError,
  ActionExtensions,
  ActionState,
  AnswerInput,
  AssignmentAnalysis,
  AssignmentAnalysisQuestion,
  AttendanceRecord,
  AttendanceStatus,
  ChangePasswordInput,
  ChangePasswordResult,
  ChapterNode,
  ClassInfo,
  CurrentUser,
  DashboardExam,
  DashboardGrade,
  DashboardHomework,
  DataScope,
  ExamDetail,
  ExamListItem,
  ExamQuestion,
  ExamStatus,
  GradeRecord,
  GrowthDataPoint,
  HomeworkDetail,
  HomeworkListItem,
  HomeworkQuestion,
  HomeworkStatus,
  JoinClassInput,
  JoinClassResult,
  LeaveClassInput,
  LeaveClassResult,
  LearningPathNode,
  LearningPathStatus,
  MarkAllAsReadInput,
  MarkAllAsReadResult,
  MarkAsReadInput,
  MarkAsReadResult,
  MutationOperationName,
  MutationResponses,
  NotificationItem,
  NotificationType,
  OperationName,
  QueryOperationName,
  QueryResponses,
  QuestionOption,
  QuestionType,
  RecommendedAction,
  RecordExamViolationInput,
  RecordExamViolationResult,
  RecordPasteEventInput,
  RecordPasteEventResult,
  RequestExtensionInput,
  RequestExtensionResult,
  SaveExamDraftInput,
  SaveExamDraftResult,
  ScheduleItem,
  ServerTime,
  StudentDashboard,
  StudentProfile,
  SubjectRef,
  SubmitExamInput,
  SubmitExamResult,
  SubmitHomeworkInput,
  SubmitHomeworkResult,
  Textbook,
  TrendDataPoint,
  UpdateNotificationPreferenceInput,
  UpdateNotificationPreferenceResult,
  UpdateProfileInput,
  UpdateProfileResult,
  WeaknessPoint,
} from "./types";

export { ERROR_CODES, ERROR_CODE_PREFIX, getErrorI18nPrefix } from "./types";

// operations
export {
  ASSIGNMENT_ANALYSIS_QUERY,
  CHANGE_PASSWORD_MUTATION,
  CHAPTERS_QUERY,
  CURRENT_USER_QUERY,
  EXAM_DETAIL_QUERY,
  HOMEWORK_DETAIL_QUERY,
  JOIN_CLASS_MUTATION,
  LEAVE_CLASS_MUTATION,
  LEARNING_PATH_QUERY,
  MARK_ALL_AS_READ_MUTATION,
  MARK_AS_READ_MUTATION,
  MY_ATTENDANCE_QUERY,
  MY_CLASSES_QUERY,
  MY_EXAMS_QUERY,
  MY_GRADES_QUERY,
  MY_HOMEWORK_QUERY,
  MY_NOTIFICATIONS_QUERY,
  MY_PROFILE_QUERY,
  MY_SCHEDULE_QUERY,
  MY_TREND_QUERY,
  MY_WEAKNESS_QUERY,
  RECORD_EXAM_VIOLATION_MUTATION,
  RECORD_PASTE_EVENT_MUTATION,
  REQUEST_EXTENSION_MUTATION,
  SAVE_EXAM_DRAFT_MUTATION,
  SERVER_TIME_QUERY,
  STUDENT_DASHBOARD_QUERY,
  STUDENT_GROWTH_QUERY,
  SUBMIT_EXAM_MUTATION,
  SUBMIT_HOMEWORK_MUTATION,
  TEXTBOOKS_QUERY,
  UPDATE_NOTIFICATION_PREFERENCE_MUTATION,
  UPDATE_PROFILE_MUTATION,
} from "./operations";

// hooks
export {
  useAssignmentAnalysis,
  useChangePassword,
  useChapters,
  useCurrentUser,
  useExamDetail,
  useHomeworkDetail,
  useJoinClass,
  useLeaveClass,
  useLearningPath,
  useMarkAllAsRead,
  useMarkAsRead,
  useMyAttendance,
  useMyClasses,
  useMyExams,
  useMyGrades,
  useMyHomework,
  useMyNotifications,
  useMyProfile,
  useMySchedule,
  useMyTrend,
  useMyWeakness,
  useRecordExamViolation,
  useRecordPasteEvent,
  useRequestExtension,
  useSaveExamDraft,
  useServerTime,
  useStudentDashboard,
  useStudentGrowth,
  useSubmitExam,
  useSubmitHomework,
  useTextbooks,
  useUpdateNotificationPreference,
  useUpdateProfile,
} from "./hooks";

export type { UseMutationResult, UseQueryResult } from "./hooks";
