<table>
	<thead>
		<tr>
			<th class="title">{{localize "midgard5.learned-skill"}}</th>
			<th class="title">{{localize "midgard5.fw"}}</th>
			<th class="title">{{localize "midgard5.bonus"}}</th>
			<th class="title">{{localize "midgard5.ew"}}</th>
			<th class="title">{{localize "midgard5.pp-short"}}</th>
			<th class="title"></th>
			<th class="title"></th>
		</tr>
	</thead>
	<tbody>
		{{#each data.calc.skills.general as |skill skillId|}}
			<tr data-item="{{skillId}}">
				<td class="padding edit-item">{{skill.label}}</td>
				<td class="fixed-value">{{skill.fw}}</td>
				<td class="fixed-value">{{skill.calc.bonus}}</td>
				<td class="fixed-value">{{skill.calc.ew}}</td>
				<td class="fixed-value">{{skill.pp}}</td>
				<td class="fixed-value"><button class="roll-button roll-learned-button"></button></td>
				<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
			</tr>
		{{/each}}
	</tbody>
</table>

<table>
	<thead>
		<tr>
			<th class="title">{{localize "midgard5.language"}}</th>
			<th class="title">{{localize "midgard5.fw"}}</th>
			<th class="title">{{localize "midgard5.bonus"}}</th>
			<th class="title">{{localize "midgard5.ew"}}</th>
			<th class="title">{{localize "midgard5.pp-short"}}</th>
			<th class="title"></th>
			<th class="title"></th>
		</tr>
	</thead>
	<tbody>
		{{#each data.calc.skills.language as |skill skillId|}}
			<tr data-item="{{skillId}}">
				<td class="padding edit-item">{{skill.label}}</td>
				<td class="fixed-value">{{skill.fw}}</td>
				<td class="fixed-value">{{skill.calc.bonus}}</td>
				<td class="fixed-value">{{skill.calc.ew}}</td>
				<td class="fixed-value">{{skill.pp}}</td>
				<td class="fixed-value"><button class="roll-button roll-learned-button"></button></td>
				<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
			</tr>
		{{/each}}
	</tbody>
</table>

<table>
	<thead>
		<tr>
			<th class="title">{{localize "midgard5.innate-ability"}}</th>
			<th class="title">{{localize "midgard5.fw"}}</th>
			<th class="title">{{localize "midgard5.bonus"}}</th>
			<th class="title">{{localize "midgard5.ew"}}</th>
			<th class="title"></th>
			<th class="title"></th>
		</tr>
	</thead>
	<tbody>
		{{#each data.calc.skills.innate as |skill skillId|}}
			<tr data-item="{{skillId}}">
				<td class="padding edit-item">{{skill.label}}</td>
				<td class="fixed-value">{{skill.fw}}</td>
				<td class="fixed-value">{{skill.calc.bonus}}</td>
				<td class="fixed-value">{{skill.calc.ew}}</td>
				<td class="fixed-value"><button class="roll-button roll-learned-button"></button></td>
				<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
			</tr>
		{{/each}}
	</tbody>
</table>

<table>
	<thead>
		<tr>
			<th class="title">{{localize "midgard5.weapon-skill"}}</th>
			<th class="title">{{localize "midgard5.fw"}}</th>
			<th class="title">{{localize "midgard5.bonus"}}</th>
			<th class="title">{{localize "midgard5.ew"}}</th>
			<th class="title">{{localize "midgard5.pp-short"}}</th>
			<th class="title"></th>
			<th class="title"></th>
		</tr>
	</thead>
	<tbody>
		{{#each data.calc.skills.combat as |skill skillId|}}
			<tr data-item="{{skillId}}">
				<td class="padding edit-item">{{skill.label}}</td>
				<td class="fixed-value">{{skill.fw}}</td>
				<td class="fixed-value">{{skill.calc.bonus}}</td>
				<td class="fixed-value">{{skill.calc.ew}}</td>
				<td class="fixed-value">{{skill.pp}}</td>
				<td class="fixed-value"><button class="roll-button roll-learned-button"></button></td>
				<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
			</tr>
		{{/each}}
	</tbody>
</table>

<table>
	<thead>
		<tr>
			<th class="title"></th>
			<th class="title">{{localize "midgard5.unlearned-skill"}}</th>
			<th class="title">{{localize "midgard5.fw"}}</th>
			<th class="title">{{localize "midgard5.bonus"}}</th>
			<th class="title">{{localize "midgard5.ew"}}</th>
			<th class="title">{{localize "midgard5.pp-short"}}</th>
			<th class="title"></th>
			<th class="title"></th>
		</tr>
	</thead>
	<tbody>
		{{#each data.skills.general as |skill key|}}
			{{#unless (isSkillInList (localizeMidgard key) ../actor.system.calc.skills.general) }}
				<tr data-skill="{{key}}">
					<td><button class="learn-button">{{localize "midgard5.learn"}}</button></td>
					<td class="padding">{{localizeMidgard key}}</td>
					<td class="fixed-value">{{skill.fw}}</td>
					<td class="fixed-value">{{skillBonus ../actor._id skill}}</td>
					<td class="fixed-value">{{skillEw ../actor._id skill}}</td>
					<td class="fixed-value"><input name="data.skills.general.{{key}}.pp" type="text" value="{{skill.pp}}" data-dtype="Number" /></td>
					<td class="fixed-value"><button class="roll-button roll-general-button"></button></td>
					<td class="fixed-value"></td>
				</tr>
			{{/unless}}
		{{/each}}
	</tbody>
</table>