// Copyright 2026. PARK Youngho. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
// This file may not be copied, modified, or distributed
// except according to those terms.
///////////////////////////////////////////////////////////////////////////////


//! # Qrate
//!
//! `Qrate` is a library for managing question banks and student data.
//! It provides functionalities to load, manipulate, and store questions and student information,
//! primarily from and to SQLite database files and Excel files for storage.

/// The `database` module provides the `SQLiteDB` for database interactions.
pub mod database;

/// The `excel` module provides functionalities for Excel file operations.
#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
pub mod excel;

/// The `header` module contains the `Header` structure for parsing file headers.
pub mod header;

/// The `qbank` module contains the `QBank` structure and its associated methods.
pub mod qbank;

/// The `qbdb` module handles the question bank database operations.
pub mod qbdb;

/// The `question` module defines the `Question` structure.
pub mod question;

/// The `sbank` module contains the `SBank` structure and related functionalities.
pub mod sbank;

/// The `sbdb` module handles the student bank database operations.
pub mod sbdb;

/// The `student` module defines the `Student` structure.
pub mod student;

/// The `shuffled_qset` module provides the `ShuffledQSet` structure and related functionalities.
pub mod shuffled_qset;

/// The `shuffled_question` module provides the `ShuffledQuestion` structure and related functionalities.
pub mod shuffled_question;

/// The `shuffler` module contains the `Shuffler` structure for shuffling questions and students.
pub mod shuffler;

/// The `generator` module provides functionalities for generating various exam formats.
pub mod generator;

/// The `utils` module contains utility functions used across the library.
pub mod utils;

/// The `error_messages` module defines the `ErrorMessage` enum for standardized error handling.
pub mod error_messages;

/// The `self_study` module provides functionalities for self-study sessions and scoring.
pub mod self_study;

/// Re-exporting key structures and functionalities for external use.
pub use database::SQLiteDB;

#[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))]
pub use excel::Excel;


pub use header::Header;
pub use qbank::QBank;
pub use qbdb::QBDB;
pub use question::{ ChoiceAnswer, Choices, Question, Questions };
pub use sbank::SBank;
pub use sbdb::SBDB;
pub use student::{ Student, Students };
pub use shuffled_question::{ ShuffledQuestion, ShuffledQuestions };
pub use shuffled_qset::{ ShuffledQSet, ShuffledQSets};
pub use shuffler::Shuffler;
pub use generator::Generator;
pub use self_study::{ SelfStudy, ScoringRule, UserAnswer };
pub use error_messages::ErrorMessage;

pub(crate) use utils::check_path;
