\whatsnote_provide_module:n { theorem }

\RequirePackage
  { mathtools, amssymb, keytheorems, cancel, extarrows,
    nicematrix, siunitx, physics2, fixdif, derivative }

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem*{corollary}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{criterion}{Criterion}
\newtheorem{assertion}{Assertion}

\theoremstyle { definition }
\newtheorem{definition}{Definition}
\newtheorem{condition}{Condition}
\renewcommand \qedsymbol
  { \ensuremath { \mathcolor { gray } { \blacksquare } } }
\newtheorem { problem }
  {
    \sffamily\scshape \color { DarkGreen \l__whats_darkmode_fading_tl }
    \faIcon { pen-square }~Problem
  } [ chapter ]
\newtheorem* { solution }
  {
    \sffamily\scshape \color { MidnightBlue \l__whats_darkmode_fading_tl }
    \faIcon { check-square }~Solution
  }
\newtheorem* { scratchwork }
  {
    \sffamily\scshape \color { MidnightBlue \l__whats_darkmode_fading_tl }
    \faIcon { eraser }~Scratch~Work
  }
\RequirePackage{comment}
\bool_if:NTF \g__whatsnote_hideanswer_bool
  {
    \sys_if_engine_pdftex:T
      {
        \NewDocumentCommand \result { m }
          { \underline { \phantom { ~ #1 ~ } } }
      }
    \sys_if_engine_xetex:T
      {
        \NewDocumentCommand \result { m }
          { \CJKunderline* { \phantom { ~ #1 ~ } } }
      }
    % \sys_if_engine_luatex:T
    %   {
    %     \NewDocumentCommand \result { m }
    %       { \Luaunderline* { \phantom { ~ #1 ~ } } }
    %   }
    \excludecomment{solution}
    \NewDocumentCommand \scratch { O { 0em } }
      { \begin{scratchwork} \leavevmode\vspace{#1} \end{scratchwork} }
    \newcommand \true { \addtocounter{task}{1} \thetask }
  }
  {
    \sys_if_engine_pdftex:T
      { \NewDocumentCommand \result { m } { \underline { ~ #1 ~ } } }
    \sys_if_engine_xetex:T
      { \NewDocumentCommand \result { m } { \CJKunderline* { ~ #1 ~ } } }
    % \sys_if_engine_luatex:T
    %   { \NewDocumentCommand \result { m } { \Luaunderline* { ~ #1 ~ } } }
    \excludecomment{scratchwork}
    \NewDocumentCommand \scratch { o } { }
    \newcommand \true { \addtocounter{task}{1} \faIcon{check-circle} }
  }

\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{algorithm}{Algorithm}
\newtheorem{question}{Question}
\newtheorem{axiom}{Axiom}
\newtheorem{property}{Property}
\newtheorem{assumption}{Assumption}
\newtheorem{hypothesis}{Hypothesis}

\RequirePackage{mdframed}
\theoremstyle{remark}
\newtheorem* { remark }
  { \sffamily \color { DarkRed } \faIcon { info-circle }~Remark }
\surroundwithmdframed
  [ hidealllines = true, leftline = true, linewidth = 2pt,
    linecolor = DarkRed, backgroundcolor = DarkRed!10,
    skipabove = 3pt, skipbelow = 0pt,
    innerleftmargin = 2ex, innerrightmargin = 2ex,
    innertopmargin = 3pt, innerbottommargin = 6pt
  ] { remark }
\newtheorem*{note}{Note}
\newtheorem{notation}{Notation}
\newtheorem{claim}{Claim}
\newtheorem{summary}{Summary}
\newtheorem{acknowledgment}{Acknowledgment}
\newtheorem{case}{Case}
\newtheorem{conclusion}{Conclusion}

\usephysicsmodule
  { ab, ab.braket, doubleprod, diagmat, xmat, nabla.legacy, op.legacy }

\endinput
