\ProvidesPackage{di/header}

\RequirePackage{di/attribute}
\RequirePackage{di/color}

\RequirePackage{fancyhdr}
\RequirePackage{graphicx}
\RequirePackage{lastpage}

\fancypagestyle{plain}{%
	\renewcommand{\headrulewidth}{0pt}
	\renewcommand{\footrulewidth}{0pt}
	\fancyhead[L]{%
		\begin{picture}(0,0)
			\put(4,-14.3){\includegraphics[width=4.7cm]{di/logo/titlepage.pdf}}
		\end{picture}%
		\begin{tikzpicture}[remember picture,overlay]
			\node[left] at (15.4, -0.4) {\thedocumenttype{} \thedocumenttitle{}};
			\draw[color=black,line width=0.02cm] (0, -0.7) -- (15.4, -0.7);%
		\end{tikzpicture}%
	}
	\fancyhead[C]{}
	\fancyhead[R]{}
	\fancyfoot[L]{}
	\fancyfoot[C]{%
		\begin{tikzpicture}[remember picture,overlay]%
			\node[right,rotate=90,opacity=.5] at (9cm, 7.5cm) {\ditemplateconfidential{}};
			\draw[color=black,line width=0.02cm] (-7.7, 1.0) -- (7.7, 1.0);%
			\node[right] at (-7.865,0.65)  {\footnotesize{Version:}};
			\node[right] at (-5.865,0.65)  {\footnotesize{\thedocumentversion}};
			\node[right] at (0.94,0.65)    {\footnotesize{Author(s):}};
			\node[right] at (2.94,0.65)    {\footnotesize{\theauthor}};
			\node[right] at (-7.865,0.3)   {\footnotesize{Status:}};
			\node[right] at (-5.865,0.3)   {\footnotesize{\thedocumentstatus}};
			\node[right] at (0.94,0.3)     {\footnotesize{Date:}};
			\node[right] at (2.94,0.3)     {\footnotesize{\thereleasedate}};
			\node[right] at (-7.865,-0.5)  {\textbf{\footnotesize{Copyright: All rights reserved. It is illegal to duplicate or publish (parts of) this document}}};
			\node[right] at (-7.865,-0.83) {\textbf{\footnotesize{in any media without approval of Dual Inventive}}};
			\node[left] at (7.94,-0.5)     {\footnotesize{Page \thepage \ of \pageref{LastPage}}};
		\end{tikzpicture}%
	}
	\fancyfoot[R]{}
}

% Use the redefined plain style as the default for all pages
\pagestyle{plain}
