\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{documents_functions}[2022/12/23 Description]

\newcommand{\formsection}[1]{
    \begin{tcolorbox}[
        colback=vstgreen!5!white,
        colframe=vstgreen, 
        left=0pt, 
        right=0pt, 
        top=0pt, 
        bottom=0pt,
        width=\textwidth,%width=\dimexpr\textwidth\relax,
        boxrule=0.2mm,
        arc=0pt,
        outer arc=0pt,
        %frame code={}
        ]
        \textbf{
            {\large \color{vstgreen}{#1}}
        }
    \end{tcolorbox}
}

\newcommand{\formanswer}[1]{
    \ifnum\showAnswers>0
        \newline \textbf{\textcolor{vstgreen}{ANTWORT:} #1}
    \else 
        \newline {\color{vstgreen}\framebox(\hsize-14pt,2.5em){}\relax}
    \fi
}

%\newcommand{\signature}[1]{
%    \addtocounter{@signdate}{1}
%    \addtocounter{@signname}{1}
%    \begin{center}
%        \parbox{3cm}{
%            \underline{\TextField[name=signdate\arabic{@signdate},width=3cm,height=2em,charsize=10pt,bordercolor=vstgreen]{}}
%            Datum
%        }
%        \hspace{0.5cm}
%        \parbox{6cm}{
%            \underline{\TextField[name=signname\arabic{@signdate},width=6cm,height=2em,charsize=10pt,bordercolor=vstgreen]{}}
%            Vorname, Nachname 
%        }
%        \hspace{0.5cm}
%        \parbox{6cm}{
%            \vspace{2em}
%            \rule{6cm}{1pt}\\
%            Unterschrift #1
%        }
%    \end{center}
%}

\newcommand{\signature}[1]{
    \addtocounter{@signdate}{1}
    \addtocounter{@signname}{1}

    \parbox{0.48\textwidth}{
        \vspace{3em}
        \rule{0.48\textwidth}{1pt}\\
        Datum \& Unterschrift: \textbf{#1}
    }
    \hfill
}

\newcommand{\signaturewithname}[1]{
    \addtocounter{@signdate}{1}
    \addtocounter{@signname}{1}

    \parbox[t]{0.48\textwidth}{
        \vspace{3em}
        \rule{0.48\textwidth}{1pt}\\
        Datum \& Unterschrift: \textbf{#1}
    }
    \hspace{0.02\textwidth}
    \parbox[t]{0.48\textwidth}{
        \vspace{3em}
        \rule{0.48\textwidth}{1pt}\\
        Name in Druckschrift
    }
    \hfill
}

\newcommand{\signaturedouble}[2]{
    \addtocounter{@signdate}{1}
    \addtocounter{@signname}{1}

    \parbox{0.48\textwidth}{
        \vspace{3em}
        \rule{0.48\textwidth}{1pt}\\
        #1
    }
    \hfill
    \parbox{0.48\textwidth}{
        \vspace{3em}
        \rule{0.48\textwidth}{1pt}\\
        #2
    }
}