\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Titles}[2025-07-16]

\RequirePackage[raggedright]{titlesec}

\ifthenelse{\NOT\boolean{doRomanNumerals}}{
	\renewcommand{\thepart}{\arabic{part}}
}{}

\titleformat{\part}[display]{
	\normalfont\sbfamily\huge
}{
	\partname{} \thepart
}{20pt}{\Huge\raggedright}

\titleformat{\chapter}[display]{
	\normalfont\sbfamily\huge\raggedright
}{
	\chaptertitlename{} \thechapter
}{20pt}{\Huge}

\titlespacing{\chapter}{0pt}{36pt plus 12pt minus 12pt}{24pt plus 8pt minus 8pt}

\titleformat*{\section}{\sbfamily\Large}

\titlespacing{\section}{0pt}{16pt plus 5pt minus 5pt}{14pt plus 4pt minus 4pt}

\titleformat*{\subsection}{\sbfamily\large}

\titlespacing{\subsection}{0pt}{14pt plus 4pt minus 4pt}{12pt plus 4pt minus 4pt}

\titleformat*{\subsubsection}{\sbfamily}

\titleformat*{\paragraph}{\sbfamily}

\titleformat*{\subparagraph}{\sbfamily}
