
\usepackage{soulutf8}
\newcommand{\warning}[1]{\textcolor{orange}{\textbf{WARNING:} #1}\PackageWarning{WARNING:}{#1!}}
\usepackage{color}
\usepackage{xcolor,colortbl}
\usepackage{soulutf8}
\usepackage{xargs}
\usepackage{ifthen}
\usepackage[normalem]{ulem}

\newcommandx{\maybe}[2][2=]{\textbf{\textcolor{orange}{\small \ifthenelse{\equal{#2}{}}{(maybe: #1)\PackageWarning{MAYBE}{#1!}}{\ifthenelse{\equal{#2}{no} \OR \equal{#2}{NO} \OR \equal{#2}{ne} \OR \equal{#2}{nope}}{\textcolor{red}{(REFUSED: \textcolor{orange}{\sout{#1}})}\PackageWarning{REFUSED}{#1!}}{\ifthenelse{\equal{#2}{ok} \OR \equal{#2}{OK} \OR \equal{#2}{jo}}{\textcolor{cyan}{\large (OK: #1)}\PackageWarning{OK}{#1!}}{(maybe: #1 - {\large\textcolor{magenta}{[[#2]]}})\PackageWarning{REFUSED}{#1!}}}}}}}

% \newcommandx{\maybe}[2][2=]{
% 	\textbf{
% 		\textcolor{orange}{
% 			\small 
% 			\ifthenelse{\equal{#2}{}}{
% 				(maybe: #1)
% 				\PackageWarning{MAYBE}{#1!}
% 			}{
% 				\ifthenelse{\equal{#2}{no} \OR \equal{#2}{NO} \OR \equal{#2}{ne} \OR \equal{#2}{nope}}{
% 					\textcolor{red}{
% 						(REFUSED: \textcolor{orange}{\sout{#1}})
% 					}
% 					\PackageWarning{REFUSED}{#1!}
% 				}{
% 					\ifthenelse{\equal{#2}{ok} \OR \equal{#2}{OK} \OR \equal{#2}{jo}}{
% 						\textcolor{cyan}{
% 							\large (OK: #1)
% 						}
% 						\PackageWarning{OK}{#1!}
% 					}{
% 						(maybe: #1 - {\large\textcolor{magenta}{[[#2]]}})
% 						\PackageWarning{REFUSED}{#1!}
% 					}
% 				}
% 			}
% 		}
% 	}
% }

\newcommandx{\resolve}[3][2=,3=]{\textbf{\ifthenelse{\equal{#2}{}}{{\huge\textcolor{yellow}{\sethlcolor{red}\hl{ #1 }}}\PackageWarning{Resolve}{#1!}}{\ifthenelse{\equal{#3}{thx} \OR \equal{#3}{ok}}{\sethlcolor{yellow}\hl{ #1 }\sethlcolor{green}\hl{ #2 }\PackageWarning{Resolved-OK}{#1! -- answer: #2}}{\ifthenelse{\equal{#3}{}}{{\huge\sethlcolor{yellow}\hl{ #1 }\sethlcolor{green}\hl{ #2 }}\PackageWarning{Resolved}{#1! -- answer: #2}}{{\Huge\textcolor{yellow}{\sethlcolor{red}\hl{ wrong argument -- #3 }}}\PackageWarning{Resolved-WrongArgumetn}{Wrong argument -- argument #3}}}}}}
% \newcommandx{\resolve}[3][2=,3=]{
% 	\textbf{
% 		\ifthenelse{\equal{#2}{}}{
% 			{
% 				\huge
% 				\textcolor{yellow}{
% 					\sethlcolor{red}\hl{ #1 }
% 				}
% 			}
% 			\PackageWarning{Resolve}{#1!}
% 		}{
% 			\ifthenelse{\equal{#3}{thx} \OR \equal{#3}{ok}}{
% 				\sethlcolor{yellow}
% 				\hl{ #1 }
% 				\sethlcolor{green}
% 				\hl{ #2 }
% 				\PackageWarning{Resolved-OK}{#1! -- answer: #2}
% 			}{
% 				\ifthenelse{\equal{#3}{}}{
% 					{
% 						\huge
% 						\sethlcolor{yellow}
% 						\hl{ #1 }
% 						\sethlcolor{green}
% 						\hl{ #2 }
% 					}
% 					\PackageWarning{Resolved}{#1! -- answer: #2}
% 				}{
% 					{
% 						\Huge
% 						\textcolor{yellow}{
% 							\sethlcolor{red}
% 							\hl{ wrong argument -- #3 }
% 						}
% 					}
% 					\PackageWarning{Resolved-WrongArgumetn}{Wrong argument -- argument #3}
% 				}
% 			}
% 		}
% 	}
% }
\newcommandx{\todo}[2][2=]{\textbf{\ifthenelse{\equal{#2}{}}{\textcolor{red}{[[todo: #1]]}\PackageWarning{TODO}{#1!}}{\ifthenelse{\equal{#2}{done} \OR \equal{#2}{DONE}}{\textcolor{green}{[[todo: #1]]}\PackageWarning{TODO-DONE}{#1!}}{\textcolor{magenta}{[[todo: #1 -- \textcolor{cyan}{#2}]]}\PackageWarning{TODO}{#1!}}}}}

% \newcommandx{\todo}[2][2=]{
% 	\textbf{
% 		\ifthenelse{\equal{#2}{}}{
% 			\textcolor{red}{
% 				[[todo: #1]]
% 			}
% 			\PackageWarning{TODO}{#1!}
% 		}{
% 			\ifthenelse{\equal{#2}{done} \OR \equal{#2}{DONE}}{
% 				\textcolor{green}{
% 					[[todo: #1]]
% 				}
% 				\PackageWarning{TODO-DONE}{#1!}
% 			}{
% 				\textcolor{magenta}{
% 					[[todo: #1 -- \textcolor{cyan}{#2}]]
% 				}
% 				\PackageWarning{TODO}{#1!}
% 			}
% 		}
% 	}
% }

\newcommand{\code}[1]{\texttt{#1}}

\newtheorem{definition}{Definícia}
\newtheorem{lemma}{Veta}

\newcommand{\conf}[0]{\noindent \textbf{Konfigurácia:}}
\newcommand{\move}[0]{\noindent \textbf{Prechod:}}
\newcommand{\acceptedL}[0]{\noindent \textbf{Prijímaný jazyk:}}
\newcommand{\exe}[0]{\noindent \textbf{Príklad:}}
\newcommand{\simul}[0]{\noindent \textbf{Simulácia:}}
\newcommand{\subproof}[2]{\noindent \textit{Dôkaz #1 (základná myšlienka): } #2}
\newcommand{\proof}[2]{\noindent \textit{Dôkaz #1: } #2}
\newcommand{\construct}[1]{\noindent \textbf{Konštrukcia #1: }}
\newcommand{\generate}[1]{\noindent \textbf{Generovanie sklova #1: }}

\newcommand{\pop}[2]{$#1\; {}_p\!\Rightarrow #2$}
\newcommand{\expand}[2]{$#1\; {}_e\!\Rightarrow #2$}
\newcommand{\moveClosure}[0]{$\; \Rightarrow^*$}

\newcommand{\derM}[2]{#1 \!\Rightarrow #2}
\newcommand{\popM}[2]{\derM{#1\; {}_p}{#2}}
\newcommand{\expandM}[2]{\derM{#1\; {}_e}{#2}}
\newcommand{\moveClosureM}[2]{#1\; \!\Rightarrow^* #2}

