% ── Set the current number of a label ───────────────────────────────
\newcommand{\setLabelNumber}[2]{%
    \setcounter{#1none}{#2}%
    \addtocounter{#1none}{-1}%
    \setcounter{#1section}{#2}%
    \addtocounter{#1section}{-1}%
    \setcounter{#1subsection}{#2}%
    \addtocounter{#1subsection}{-1}%
    \setcounter{#1subsubsection}{#2}%
    \addtocounter{#1subsubsection}{-1}%
    \setcounter{#1paragraph}{#2}%
    \addtocounter{#1paragraph}{-1}%
}

\newcommand{\stepLabelNumber}[1]{%
    \stepcounter{#1none}%
    \stepcounter{#1section}%
    \stepcounter{#1subsection}%
    \stepcounter{#1subsubsection}%
    \stepcounter{#1paragraph}%
}


\newcommand{\newsection}{%
    \newpage
    \newsectionNoPB
}

\newcommand{\newsectionNoPB}{
    \ifthenelse{\equal{\numberingpreset}{off}}{}{%
        \resetNumbering%
        \resetTableAndFigureNumbering%
    }%
}

\newcommand{\resetTableAndFigureNumbering}{%
    \ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{combined}}{
        \setcounter{table}{0}
    }{}%
    \ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{default}}{
        \setcounter{table}{0}
    }{}%
    \ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{combined}}{%
        \setcounter{figure}{0}
    }{}%
    \ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{default}}{
        \setcounter{figure}{0}
    }{}%
}


% Numbering toggling
\newcommand{\numberingOff}{
    \setboolean{numberingDisabled}{true}
    \loadNumberingConfig
}
\newcommand{\numberingOn}{
    \setboolean{numberingDisabled}{false}
    \loadNumberingConfig
}

\newcommand{\setsubsectionnumbering}[1]{
    \renewcommand{\subsectionnumbering}{#1}
    \loadNumberingConfiguration
}

\newcommand{\setnumberingpreset}[1]{
    \renewcommand{\numberingpreset}{#1}
    \loadNumberingConfiguration
}
