<table>
	<thead>
		<tr>
			<th>Mods</th>
			<th></th>
			<th></th>
			<th><button class="add-mod">+</button></th>
		</tr>
	</thead>
	<tbody>
		{{#each mods as |mod modId|}}
			<tr>
				<td>
					<select class="select-mod-type" name="data.mods.{{modId}}.type" data-type="String">
						{{#select mod.type}}
							<option value="attribute">{{localize "midgard5.attribute"}}</option>
							<option value="stat">{{localize "midgard5.bonus"}}</option>
							<option value="skill">{{localize "midgard5.skill"}}</option>
						{{/select}}
					</select>
				</td>

				<td>
					<select class="select-id" name="data.mods.{{modId}}.id" data-type="String">
						{{#select mod.id}}
							<option value="">{{localize "midgard5.no-skill"}}</option>
							{{#each (lookup ../calc.mods modId) as |name key|}}
								<option value="{{key}}">{{name}}</option>
							{{/each}}
						{{/select}}
					</select>
				</td>

				<td>
					<select class="select-mod-operation" name="data.mods.{{modId}}.operation" data-type="String">
						{{#select mod.operation}}
							{{#if (eq mod.type "attribute")}}
								<option value="add100">{{localize "midgard5.mod-operation-add100"}}</option>
								<option value="roll">{{localize "midgard5.mod-operation-roll"}}</option>
							{{/if}}
							<option value="add">{{localize "midgard5.mod-operation-add"}}</option>
							<option value="set">{{localize "midgard5.mod-operation-set"}}</option>
							<option value="fixed">{{localize "midgard5.mod-operation-fixed"}}</option>
							<option value="subtract">{{localize "midgard5.mod-operation-subtract"}}</option>
							<option value="multiply">{{localize "midgard5.mod-operation-multiply"}}</option>
							<option value="division">{{localize "midgard5.mod-operation-division"}}</option>
						{{/select}}
					</select>
				</td>

				<td>
					<input name="data.mods.{{modId}}.value" type="number" value="{{mod.value}}" data-dtype="Number" />
				</td>
			</tr>
		{{/each}}
	</tbody>
</table>