\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{PrimeTeX/Manual}[2025-07-09]

\RequirePackage{ifthen}

\newboolean{isAdminManual}
\setboolean{isAdminManual}{false}

\DeclareOption{admin}{
	\setboolean{isAdminManual}{true}
}

\newboolean{isDarkMode}
\setboolean{isDarkMode}{false}

\DeclareOption{darkmode}{
	\setboolean{isDarkMode}{true}
}

\DeclareOption{showoverfull}{
	\overfullrule = 1in
}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}

\ProcessOptions\relax

\LoadClass{book}

\ifthenelse{\boolean{isDarkMode}}{
	\RequirePackage[darkmode]{PrimeTeX/packages/Color}
}{
	\RequirePackage{PrimeTeX/packages/Color}
}

\RequirePackage{PrimeTeX/packages/CrossRef}

\RequirePackage{PrimeTeX/packages/DocProperties}

\RequirePackage{PrimeTeX/packages/Fonts}

\RequirePackage{PrimeTeX/packages/Glossary}

\RequirePackage{PrimeTeX/packages/Graphics}

\RequirePackage{PrimeTeX/packages/Hyphenation}

\RequirePackage{PrimeTeX/packages/Index}

\RequirePackage{PrimeTeX/packages/Layout}

\RequirePackage{PrimeTeX/packages/Links}

\RequirePackage{PrimeTeX/packages/Marginalia}

\RequirePackage{PrimeTeX/packages/Tables}

\RequirePackage{PrimeTeX/packages/TitlePage}

\RequirePackage{PrimeTeX/packages/Titles}

\newcommand{\IfAdminManual}[2]{
	\ifthenelse{\boolean{isAdminManual}}{#1}{#2}
}