% use \newcommand instead of \def because we want to throw an error if a command gets redefined
\newcommand\smartnewline[1]{\ifhmode\\\fi}  % newline only if there in horizontal mode
\newcommand\gooditem{\item[{$\color{fg-green}\bullet$}]}
\newcommand\baditem{\item[{$\color{fg-red}\bullet$}]}

\AtBeginDocument{
\newcommand\blacksquare{\mdblksquare}

% \forceNewCommand\checkmark{\emoji{check-mark}}
\newcommand\symForbidden{\emoji{cross-mark}}
\newcommand\symAllowed{\emoji{check-mark}}
% \forceNewCommand\crossmark{$\times$}
}

% INPUT
% 1: starting pattern of files to input using the Input command. All other files are ignored 
\newcommand\InputOnly[1]{\edef\inputOnlyFile{#1}}
\edef\inputOnlyFile{all}

\newcommand\Input[1]{
    % yes this could surely be done in tex
    \directlua{
        if '\luaescapestring{\inputOnlyFile}' == 'all' or string.startswith('\luaescapestring{#1}', '\luaescapestring{\inputOnlyFile}') then
            tex.print("\\input{\luaescapestring{#1}}")
        end
    }
}
