\ProvidesPackage{ltstyle-common}

% meta
\usepackage{pgfkeys}

\newif\ifmypackage@sansserif

\DeclareOption{serif}{
    \mypackage@sansseriffalse
}
\DeclareOption{sansserif}{
    \mypackage@sansseriftrue
}

\ExecuteOptions{sansserif} % default is fullpage

\ProcessOptions\relax

\ifmypackage@sansserif
    \usepackage[sfdefault, light]{FiraSans}
\fi

% Font
\usepackage[T1]{fontenc}
\usepackage{microtype}

% links
\usepackage[hidelinks]{hyperref}

% images
\usepackage{graphicx}
\usepackage{svg}

% units
\usepackage{siunitx}

% Color defintions
\usepackage{xcolor}
\definecolor{lts-orange}{HTML}{F6B26B}
\definecolor{lts-yellow}{HTML}{F1C232}
\definecolor{lts-green}{HTML}{93c47d}
\definecolor{lts-red}{HTML}{cc4125}
\definecolor{lts-blue}{HTML}{4a86e8}
\definecolor{lts-magenta}{HTML}{a64d79}
\definecolor{lts-teal}{HTML}{228c9c}

% tcb defines
\usepackage{tcolorbox}
\tcbuselibrary{listings, minted, skins}
\tcbset{
    colframe=white,
    colback=white!94!black,
    arc=0mm,
    boxsep=1mm,
    left=0mm,
    right=0mm,
    top=0mm,
    bottom=0mm
}

\lstset{
    columns=fullflexible,
    frame=single,
    basicstyle=\small\ttfamily,
}

\makeatletter
\pgfkeys{/lts/inlineverb/.cd,
    colframe/.initial=white,
    colback/.initial=white!95!black,
}
\def\lts@set@keys#1{%%
\pgfkeys{/lts/inlineverb/.cd,#1}}
\def\lts@get#1{%%
\pgfkeysvalueof{/lts/inlineverb/#1}}

\newcommand\inlineverb[2][]{%
    \bgroup%
    \lts@set@keys{#1}%
    \tcbox[
        enhanced,
        nobeforeafter,
        tcbox raise base,
        boxrule=1.5pt,
        top=0mm,
        bottom=0mm,
        right=0mm,
        left=0mm,
        arc=2pt,
        boxsep=3pt,
        coltext=white!5!black,
        colback=\lts@get{colback},
        colframe=\lts@get{colframe},
        fontupper=\ttfamily\footnotesize
    ]{#2}
    \egroup
}

\robustify{\inlineverb}

\pdfstringdefDisableCommands{%
  \def\inlineverb#1{'#1'}%
}


%\newcommand\Add[1]{%%
  %\bgroup
  %\lts@set@keys{#1}%%
  %\textit{\lts@get{colback}} `\lts@get{colframe}'%%
  %\egroup}




\makeatother
