<form class="l5r5e gm-monitor" autocomplete="off">
{{#ifCond data.view "==" "characters"}}
    {{!-- Characters & Npcs --}}
    <table>
        <thead>
            <th class="img"></th>
            <th class="name">{{localize 'l5r5e.sheets.name'}}</th>
            <th class="stance"><i class="i_earth"></i></th>
            <th class="prepared"><i class="fas prepared-icon-true"></i></th>
            <th class="weapon"><i class="fas fa-fan"></i></th>
            <th class="armor"><i class="fas fa-user-shield"></i></th>
            <th class="rank">{{localize 'l5r5e.sheets.rank'}}</th>
            <th class="fatigue">{{localize 'l5r5e.attributes.fatigue'}}</th>
            <th class="strife">{{localize 'l5r5e.attributes.strife'}}</th>
            <th class="vigilance">{{localize 'l5r5e.gm.monitor.focus_vigilance'}}</th>
            <th class="void"><i class="i_void"></i></th>
            <th class=""></th>
            <th class=""></th>
        </thead>
        <tbody>
        {{#each data.actors as |actor|}}
        <tr>
            <td><img data-actor-id="{{actor.id}}" draggable="true" class="profile actor-profile dragndrop-actor-id pointer" title="{{actor.name}}" src="{{actor.img}}"></td>
            <td>
                <a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a>
                {{#if actor.data.data.attitude}}<p>({{actor.data.data.attitude}})</p>{{/if}}
            </td>
            <td>
                <a data-actor-id="{{actor.id}}" data-type="stance" class="actor-modify-control">
                    <i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.data.data.stance}} - {{lookup actor.data.data.rings actor.data.data.stance}})</h2>{{localizeStanceTip actor.data.data.stance}}" class="i_{{actor.data.data.stance}} actor-infos-control"></i>
                </a>
            </td>
            <td>
                <a data-actor-id="{{actor.id}}" data-type="prepared" class="actor-modify-control">
                    <i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.initiative.title'}} : {{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=actor.isPrepared)}}</h2>" class="fa fas prepared-icon-{{actor.isPrepared}} {{#ifCond actor.isPrepared '==' 'false'}}badvalue{{/ifCond}} actor-infos-control"></i>
                </a>
            </td>
            <td>{{#if actor.haveWeaponEquipped}}<i data-type="weapons" data-actor-id="{{actor.id}}" class="fas fa-fan actor-infos-control {{#if actor.haveWeaponReadied}}badvalue{{/if}}"></i>{{/if}}</td>
            <td>{{#if actor.haveArmorEquipped}}<i data-type="armors" data-actor-id="{{actor.id}}" class="fas fa-user-shield actor-infos-control"></i>{{/if}}</td>
            <td>
                <p>
                    {{#if actor.data.data.identity.school_rank}}
                        {{actor.data.data.identity.school_rank}}
                    {{else}}
                        <i class="i_bushi" title="{{localize 'l5r5e.social.npc.combat'}}"></i> {{actor.data.data.conflict_rank.martial}} <i class="i_courtier" title="{{localize 'l5r5e.social.npc.intrigue'}}"></i> {{actor.data.data.conflict_rank.social}}
                    {{/if}}
                </p>
                <p>
                    {{#if actor.data.data.rings_affinities}}
                    {{#each actor.data.data.rings_affinities as |ringValue ringId|}}
                        {{#if ringValue}}
                            <i class="i_{{ringId}}" title="{{localizeRing ringId}}"></i> {{ringValue}}
                        {{/if}}
                    {{/each}}
                    {{/if}}
                </p>
            </td>
            <td>
                <a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="fatigue" class="actor-modify-control">
                    <span class="{{#ifCond actor.data.data.fatigue.value '>' actor.data.data.fatigue.max}}badvalue{{/ifCond}}">{{actor.data.data.fatigue.value}}</span>
                    / {{actor.data.data.fatigue.max}}
                </a>
            </td>
            <td>
                <a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="strife" class="actor-modify-control">
                    <span class="{{#ifCond actor.data.data.strife.value '>' actor.data.data.strife.max}}badvalue{{/ifCond}}">{{actor.data.data.strife.value}}</span>
                    / {{actor.data.data.strife.max}}
                </a>
            </td>
            <td>
                {{actor.data.data.focus}}
                / {{#if actor.data.data.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.data.data.vigilance}}{{/if}}
            </td>
            <td>
                <a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="void_points" class="actor-modify-control">
                    {{actor.data.data.void_points.value}}
                    / {{actor.data.data.void_points.max}}
                </a>
            </td>
            <td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
            <td><span data-actor-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
        </tr>
        {{/each}}
        </tbody>
    </table>
{{else}}
    {{!-- Armies --}}
    <table>
        <thead>
            <th class="img"></th>
            <th class="name">{{localize 'l5r5e.sheets.name'}}</th>
            <th class="warlord">{{localize 'l5r5e.army.warlord'}}</th>
            <th class="casualties"><i class="fas fa-user-injured" title="{{localize 'l5r5e.army.battle_readiness.casualties'}}"></i> / <i class="fas fa-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"></i></th>
            <th class="panic"><i class="fas fa-ghost" title="{{localize 'l5r5e.army.battle_readiness.panic'}}"></i> / <i class="fas fa-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"></i></th>
            <th class="commander">{{localize 'l5r5e.army.commander'}} {{localize 'l5r5e.gm.monitor.honor_glory_status'}}</th>
            <th class=""></th>
            <th class=""></th>
        </thead>
        <tbody>
        {{#each data.actors as |actor|}}
        <tr>
            <td><img data-actor-id="{{actor.id}}" draggable="true" class="profile actor-profile dragndrop-actor-id pointer" title="{{actor.name}}" src="{{actor.img}}"></td>
            <td><a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a></td>
            <td>
                {{#if actor.data.data.warlord_actor_id}}
                    <a data-actor-id="{{actor.data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.warlord}}</a>
                {{else}}
                    {{actor.data.data.warlord}}
                {{/if}}
            </td>
            <td>
                <a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="casualties" class="actor-modify-control">
                    <span class="{{#ifCond actor.data.data.battle_readiness.casualties_strength.value '>' actor.data.data.battle_readiness.casualties_strength.max}}badvalue{{/ifCond}}">{{actor.data.data.battle_readiness.casualties_strength.value}}</span>
                     / {{actor.data.data.battle_readiness.casualties_strength.max}}
                 </a>
             </td>
            <td>
                <a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="panic" class="actor-modify-control">
                    <span class="{{#ifCond actor.data.data.battle_readiness.panic_discipline.value '>' actor.data.data.battle_readiness.panic_discipline.max}}badvalue{{/ifCond}}">{{actor.data.data.battle_readiness.panic_discipline.value}}</span>
                    / {{actor.data.data.battle_readiness.panic_discipline.max}}
                </a>
            </td>
            <td>
                {{#if actor.data.data.commander_actor_id}}
                    <a data-actor-id="{{actor.data.data.commander_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.commander}}</a>
                {{else}}
                    {{actor.data.data.commander}}
                {{/if}}
                <br>
                <span class="{{#ifCond actor.data.data.commander_standing.honor '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.data.data.commander_standing.honor '<' 30}}badvalue{{/ifCond}}">{{actor.data.data.commander_standing.honor}}</span>
                / <span class="{{#ifCond actor.data.data.commander_standing.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.data.data.commander_standing.glory '<' 20}}badvalue{{/ifCond}}">{{actor.data.data.commander_standing.glory}}</span>
                / {{actor.data.data.commander_standing.status}}
            </td>
            <td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
            <td><span data-actor-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
        </tr>
        {{/each}}
        </tbody>
    </table>
{{/ifCond}}
</form>