<div class="clearareaBox area-box">

	{{#if showheadline}}
		<div class="sheet-headline sheet-banner splatFont">
			<span class="sheet-banner-text">{{localize 'wod.abilities.abilities'}}</span>
		</div>
	{{/if}}

	<div class="clearareaBox">
		<div class="ability-statArea pullLeft headlineGroup splatFont centerText">{{localize 'wod.abilities.talents'}}</div>
		<div class="ability-statArea pullLeft headlineGroup splatFont centerText">{{localize 'wod.abilities.skills'}}</div>
		<div class="ability-statArea pullLeft headlineGroup splatFont centerText">{{localize 'wod.abilities.knowledges'}}</div>
	</div>
	
	<div class="ability-statArea pullLeft">

		{{#if (isEmpty talents)}}
			<div class="centerText headlineNormal">{{localize 'wod.abilities.notalents'}}</div>
		{{/if}}
	
		{{#each talents as |ability key|}}	
			<div class="clearareaBox">
				{{#if (eq ../actor.system.settings.splat ../config.splat.exalted)}}
					<div class="pullLeft resource-counter"><input class="item-active pointer resource-value-step" name="ability.system.settings.isfavored" type="checkbox" data-type="{{../config.sheettype.exalted}}" data-key="{{ability._id}}" data-ability="true" {{isChecked ability.system.settings.isfavorited}}></input></div>
				{{/if}}

				<label for="data.system.abilities.{{ability.system.id}}.system.value"
					class="pullLeft {{#if ../useroll}}vrollable{{/if}} {{#if (gt ability.system.max 5)}}supernaturalAttribute{{/if}} ability-headlineWidth headlineNormal" 
					data-type="{{../config.sheettype.mortal}}"
					data-key="{{ability._id}}"
					{{#if ../useroll}}data-action="rollDice"{{/if}}
					data-ability="true">
							{{localize ability.system.label}}
				</label>	

				{{#if ../showvalues}}

					<div class="{{#if (gt ability.system.max 5)}}pullRight{{else}}pullLeft{{/if}} resource-value"  
						data-itemid="{{ability._id}}"
						data-key="{{ability.system.id}}"
						data-value="{{ability.system.value}}" 
						data-name="system.value">

						{{#numLoop ability.system.max}}					
							<span class="{{#if (gt ability.system.max 5)}}supernaturalAttribute{{/if}} resource-value-step" data-action="editDot" data-type="{{../../config.sheettype.mortal}}" data-index="{{this}}" data-itemid="{{ability._id}}" data-ability="core"></span>					
						{{/numLoop}}

						{{#if (eq ../locked false)}}
							<div class="pullRight speciality-ability-icon {{getSpecialityIcon ability}}">
								<a class="item-edit" title="{{localize 'wod.labels.edit.ability'}}" data-type="Ability" data-action="itemEdit" data-itemid="{{ability._id}}"><i class="fa-solid fa-pen-to-square"></i></a>
							</div>
						{{else if (hasSpeciality ability)}}
							<div class="pullRight speciality-ability-icon">
								<i class="fa-solid fa-circle-exclamation {{getSpecialityIcon ability}}" title="{{ability.system.speciality}}"></i>
							</div>
						{{else}}
							<div class="pullRight speciality-ability-empty-icon">
								&nbsp;
							</div>
						{{/if}}
						
					</div>	

				{{/if}}
				
				<div>

					{{#if ../showvisibleicon}}					
						{{#if ability.system.settings.isvisible}}
							<i class="item-active pointer icon fa-solid fa-eye" data-itemid="{{ability._id}}" data-type="settings.isvisible" data-action="itemSwitch"></i>
						{{else}}
							<i class="item-active pointer icon fa-solid fa-eye-slash" data-itemid="{{ability._id}}" data-type="settings.isvisible" data-action="itemSwitch"></i>
						{{/if}}
						{{#if ability.system.settings.isremovable}}
							{{> "systems/worldofdarkness/templates/actor/parts/list_icons.hbs" showsendchat=false showedit=false showdelete=true showtooltip=false item=ability locked=../locked edittitle="wod.labels.edit.headline" deletetitle="wod.labels.remove.headline" collapseclass="ability"}}
						{{/if}}
					{{/if}}
				
				</div>
			</div>				
		{{/each}}
	
	</div>

	<div class="ability-statArea pullLeft">

		{{#if (isEmpty skills)}}
			<div class="centerText headlineNormal">{{localize 'wod.abilities.noskills'}}</div>
		{{/if}}
	
		{{#each skills as |ability key|}}	
			<div class="clearareaBox">
				{{#if (eq ../actor.system.settings.splat ../config.splat.exalted)}}
					<div class="pullLeft resource-counter"><input class="item-active pointer resource-value-step" name="ability.system.settings.isfavored" type="checkbox" data-type="{{../config.sheettype.exalted}}" data-key="{{ability._id}}" data-ability="true" {{isChecked ability.system.settings.isfavorited}}></input></div>
				{{/if}}

				<label for="data.system.abilities.{{ability.system.id}}.system.value"
					class="pullLeft {{#if ../useroll}}vrollable{{/if}} {{#if (gt ability.system.max 5)}}supernaturalAttribute{{/if}} ability-headlineWidth headlineNormal" 
					data-type="{{../config.sheettype.mortal}}"
					data-key="{{ability._id}}"
					{{#if ../useroll}}data-action="rollDice"{{/if}}
					data-ability="true">
							{{localize ability.system.label}}
				</label>	

				{{#if ../showvalues}}

					<div class="{{#if (gt ability.system.max 5)}}pullRight{{else}}pullLeft{{/if}} resource-value"  
						data-itemid="{{ability._id}}"
						data-key="{{ability.system.id}}"
						data-value="{{ability.system.value}}" 
						data-name="system.value">

						{{#numLoop ability.system.max}}					
							<span class="{{#if (gt ability.system.max 5)}}supernaturalAttribute{{/if}} resource-value-step" data-action="editDot" data-type="{{../../config.sheettype.mortal}}" data-index="{{this}}" data-itemid="{{ability._id}}" data-ability="core"></span>					
						{{/numLoop}}

						{{#if (eq ../locked false)}}
							<div class="pullRight speciality-ability-icon {{getSpecialityIcon ability}}">
								<a class="item-edit" title="{{localize 'wod.labels.edit.ability'}}" data-type="Ability" data-action="itemEdit" data-itemid="{{ability._id}}"><i class="fa-solid fa-pen-to-square"></i></a>
							</div>
						{{else if (hasSpeciality ability)}}
							<div class="pullRight speciality-ability-icon">
								<i class="fa-solid fa-circle-exclamation {{getSpecialityIcon ability}}" title="{{ability.system.speciality}}"></i>
							</div>
						{{else}}
							<div class="pullRight speciality-ability-empty-icon">
								&nbsp;
							</div>
						{{/if}}
						
					</div>	

				{{/if}}
				{{#if ../showvisibleicon}}
					<div>
						{{#if ability.system.settings.isvisible}}
							<i class="item-active pointer icon fa-solid fa-eye" data-itemid="{{ability._id}}" data-type="settings.isvisible" data-action="itemSwitch"></i>
						{{else}}
							<i class="item-active pointer icon fa-solid fa-eye-slash" data-itemid="{{ability._id}}" data-type="settings.isvisible" data-action="itemSwitch"></i>
						{{/if}}
						{{#if ability.system.settings.isremovable}}
							{{> "systems/worldofdarkness/templates/actor/parts/list_icons.hbs" showsendchat=false showedit=false showdelete=true showtooltip=false item=ability locked=../locked edittitle="wod.labels.edit.headline" deletetitle="wod.labels.remove.headline" collapseclass="ability"}}
						{{/if}}
					</div>
				{{/if}}
			</div>				
		{{/each}}
	
	</div>

	<div class="ability-statArea pullLeft">

		{{#if (isEmpty knowledges)}}
			<div class="centerText headlineNormal">{{localize 'wod.abilities.noknowledges'}}</div>
		{{/if}}
	
		{{#each knowledges as |ability key|}}	
			<div class="clearareaBox">
				{{#if (eq ../actor.system.settings.splat ../config.splat.exalted)}}
					<div class="pullLeft resource-counter"><input class="item-active pointer resource-value-step" name="ability.system.settings.isfavored" type="checkbox" data-type="{{../config.sheettype.exalted}}" data-key="{{ability._id}}" data-ability="true" {{isChecked ability.system.settings.isfavorited}}></input></div>
				{{/if}}

				<label for="data.system.abilities.{{ability.system.id}}.system.value"
					class="pullLeft {{#if ../useroll}}vrollable{{/if}} {{#if (gt ability.system.max 5)}}supernaturalAttribute{{/if}} ability-headlineWidth headlineNormal" 
					data-type="{{../config.sheettype.mortal}}"
					data-key="{{ability._id}}"
					{{#if ../useroll}}data-action="rollDice"{{/if}}
					data-ability="true">
							{{localize ability.system.label}}
				</label>	

				{{#if ../showvalues}}

					<div class="{{#if (gt ability.system.max 5)}}pullRight{{else}}pullLeft{{/if}} resource-value"  
						data-itemid="{{ability._id}}"
						data-key="{{ability.system.id}}"
						data-value="{{ability.system.value}}" 
						data-name="system.value">

						{{#numLoop ability.system.max}}					
							<span class="{{#if (gt ability.system.max 5)}}supernaturalAttribute{{/if}} resource-value-step" data-action="editDot" data-type="{{../../config.sheettype.mortal}}" data-index="{{this}}" data-itemid="{{ability._id}}" data-ability="core"></span>					
						{{/numLoop}}

						{{#if (eq ../locked false)}}
							<div class="pullRight speciality-ability-icon {{getSpecialityIcon ability}}">
								<a class="item-edit" title="{{localize 'wod.labels.edit.ability'}}" data-type="Ability" data-action="itemEdit" data-itemid="{{ability._id}}"><i class="fa-solid fa-pen-to-square"></i></a>
							</div>
						{{else if (hasSpeciality ability)}}
							<div class="pullRight speciality-ability-icon">
								<i class="fa-solid fa-circle-exclamation {{getSpecialityIcon ability}}" title="{{ability.system.speciality}}"></i>
							</div>
						{{else}}
							<div class="pullRight speciality-ability-empty-icon">
								&nbsp;
							</div>
						{{/if}}
						
					</div>	

				{{/if}}
				{{#if ../showvisibleicon}}
					<div>
						{{#if ability.system.settings.isvisible}}
							<i class="item-active pointer icon fa-solid fa-eye" data-itemid="{{ability._id}}" data-type="settings.isvisible" data-action="itemSwitch"></i>
						{{else}}
							<i class="item-active pointer icon fa-solid fa-eye-slash" data-itemid="{{ability._id}}" data-type="settings.isvisible" data-action="itemSwitch"></i>
						{{/if}}
						{{#if ability.system.settings.isremovable}}
							{{> "systems/worldofdarkness/templates/actor/parts/list_icons.hbs" showsendchat=false showedit=false showdelete=true showtooltip=false item=ability locked=../locked edittitle="wod.labels.edit.headline" deletetitle="wod.labels.remove.headline" collapseclass="ability"}}
						{{/if}}
					</div>
				{{/if}}
			</div>				
		{{/each}}
	
	</div>
	
</div>	