\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}{48pt plus 12pt minus 12pt}{24pt plus 6pt minus 6pt}

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

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

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

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

\titleformat*{\subsubsection}{\sbfamily}

\titleformat*{\paragraph}{\sbfamily}

\titleformat*{\subparagraph}{\sbfamily}
