<div class="headlineRow headlineList splatFont combat-ranged-itemlist">
    <div class="width-namebox">{{localize "wod.labels.combat.ranged"}}</div>     
    <div class="width-smallbox">{{localize "wod.combat.weapon.attr"}}</div>
    <div class="width-abilitybox">{{localize "wod.combat.weapon.ability"}}</div>
    <div class="width-valuebox">{{localize "wod.combat.weapon.acc"}}</div>
    <div class="width-valuebox">{{localize "wod.combat.weapon.diff"}}</div>
    <div class="width-valuebox" style="text-align: left;">{{localize "wod.combat.weapon.damage"}}</div>
    <div class="width-valuebox">{{localize "wod.combat.weapon.range"}}</div>
    <div class="width-valuebox">{{localize "wod.combat.weapon.rate"}}</div>
    <div class="width-smallbox">{{localize "wod.combat.weapon.clip"}}</div>   
</div>

<div>

    {{#each actor.system.listdata.combat.rangedWeapons as |item id|}}

        <div class="item-row-area combat-ranged-itemlist">
            <div class="dragrow headlineNormal combat-ranged-itemlist" data-itemid="{{item._id}}">
                <div class="width-iconbox draggable"><i class="icon fa-solid fa-grip-vertical"></i></div>

                {{#if item.system.attack.isrollable}}
                    <div class="width-namebox {{#if item.system.attack.isrollable}}vrollable{{/if}}" 
                        data-type="{{../config.sheettype.mortal}}"
                        data-object="Ranged"
                        data-rollitem="true" 
                        data-itemid="{{item._id}}"
                        title="{{item.name}}">            
                        {{shorten item.name 18}}&nbsp;
                    </div>
                {{else}}
                    {{#if item.system.damage.isrollable}}
                        <div class="width-namebox {{#if item.system.damage.isrollable}}vrollable{{/if}}" 
                            data-type="{{../config.sheettype.mortal}}"
                            data-object="Damage"
                            data-rollitem="true" 
                            data-itemid="{{item._id}}"
                            title="{{item.name}}">
                            {{shorten item.name 18}}&nbsp;
                        </div>
                    {{else}}
                        <div class="width-iconbox-empty">&nbsp;</div>
                        <div class="width-namebox" title="{{item.name}}">{{shorten item.name 18}}&nbsp;</div>
                    {{/if}}
                {{/if}}
                <div class="width-smallbox">{{shorten (localize (getAttributes item.system.attack.attribute)) 10}}&nbsp;</div>
                <div class="width-abilitybox">
                    {{#if (eq item.system.attack.ability "custom")}}
                        {{shorten (getSecondaryAbility item.system.attack.ability ../actor item.system.attack.secondaryabilityid) 10}}
                    {{else}}
                        {{shorten (localize (getAbility item.system.attack.ability ../actor)) 10}}
                    {{/if}}&nbsp;
                </div>
                <div class="width-valuebox">{{item.system.attack.accuracy}}</div>
                <div class="width-valuebox">
                    {{#if (eq item.system.difficulty "-1")}}
                        {{localize "wod.labels.varies"}}
                    {{else}}
                        {{item.system.difficulty}}
                    {{/if}}
                </div>
                <div class="width-valuebox" style="text-align: left;">
                    {{#if item.system.damage.isrollable}}
                        {{captilizeFirst (convertDamageCode item.system.damage.attribute item.system.damage.bonus item.system.damage.type)}}
                    {{else}}
                        &nbsp;
                    {{/if}}
                </div>
                <div class="width-valuebox">{{item.system.range}}</div>
                <div class="width-valuebox">{{item.system.rate}}</div>
                <div class="width-smallbox">
                    <input class="sheet-infoValues smallbox inputdata editable" type="text" value="{{item.system.clip.value}}" data-itemid="{{item._id}}" data-source="item" data-type="clip.value" style="width: 25px;" /> /
                    {{item.system.clip.max}}
                </div>
                <!--<div class="width-valuebox">
                    {{#if item.system.mode.hasreload}}{{localize "wod.combat.mode.reload"}} {{/if}}{{#if item.system.mode.hasburst}}{{localize "wod.combat.mode.burst"}} {{/if}}{{#if item.system.mode.hasfullauto}}{{localize "wod.combat.mode.fullauto"}} {{/if}}{{#if item.system.mode.hasspray}}{{localize "wod.combat.mode.spray"}}{{/if}}
                </div>-->
                
            </div>

            <div class="iconBox">
                
                <a class="pointer send-chat" title="{{localize 'wod.labels.send'}}" data-itemid="{{item._id}}"><i class="icon fa-solid fa-comment-dots"></i></a>

                {{#if (eq ../locked false)}} 
                    <a class="pointer item-edit" title="{{localize 'wod.labels.edit.rangedweapon'}}" data-type="{{item.type}}" data-item-id="{{item._id}}"><i class="icon fa-solid fa-pen-to-square"></i></a>
                    <a class="pointer item-delete" title="{{localize 'wod.labels.remove.rangedweapon'}}" data-type="{{item.type}}" data-item-id="{{item._id}}"><i class="icon fa-solid fa-trash-can"></i></a>
                {{/if}}

                {{#if (showToolTip item)}}
                    <i class="pointer icon collapsible button fa-solid fa-expand"
                            title="{{localize 'wod.labels.show.description'}}"
                            data-itemid="{{item._id}}"></i>
                {{else}}
                    <i class="icon no-description-disabled fa-solid fa-solid fa-expand"></i>
                {{/if}}

                <a class="pointer" title="LANG: Menu" data-itemid="{{item._id}}"><i class="icon fa-solid fa-ellipsis-vertical"></i></a>
            </div>
        </div>
        <div class="description" data-itemid="{{item._id}}">

            {{{getToolTip_v2 item.system.description item.system.details item.system.bonuslist ../actor}}}

        </div>

    {{/each}}

</div>