mixin characteristic-display(name, attr) 
    .tis-characteristic(class=`tis-characteristic--${attr}`)
        .tis-characteristic__label(data-i18n=name)=name
        input.tis-characteristic__input(name=`attr_${attr}`, type="text")

mixin select-display(name, attr, options) 
    label.tis-characteristic(class=`tis-characteristic--${attr}`)
        .tis-characteristic__label(data-i18n=name)=name
        select.tis-characteristic__select(name=`attr_${attr}`, type="text")
            each option in options
                - const val = option.toLowerCase();
                option(data-i18n=option, value=val)=option

mixin stat-display(name, attr)
    - 
        const roll = [
            `&{template:tispace}`,
            `{{name=${name}}}`,
            `{{character_name=@{character_name}}}`,
            `{{roll=[[1@{${attr}}!+?{Bonus|Yes,@{${attr}_bonus}|No,0|None,0}+?{Bonuses / Penalties|0}]]}}`,
        ].join(" ");
    .tis-stat
        button.tis-stat__button(data-i18n=name, name=`roll_${attr}`, type="roll", value=roll)=name
        .tis-stat__bonus
            input(name=`attr_${attr}_bonus`, type="number", value="0")
        select.tis-stat__select(name=`attr_${attr}`)
            +dice-select()

mixin dice-select(selected)
    - const dice = ["d4", "d6", "d8", "d10", "d12", "d20"];
    each die in dice
        option(value=die selected=(die == selected))=die