<form class="item-sheet {{cssClass}}" autocomplete="off">
	<header class="sheet-header">
		<img class="item-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
		<h1><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
	</header>
	<div class="sheet-content">
		<table>
			<tbody>
				<tr>
					<td colspan=4>
						<div class="flexrow">
							<span>
								<input id="data.magic" type="checkbox" name="data.magic" {{checked data.magic}}>
								<label for="data.magic">{{localize "midgard5.magic"}}</label>
							</span>

							<span>
								<input id="data.ranged" type="checkbox" name="data.ranged" {{checked data.ranged}}>
								<label for="data.ranged">{{localize "midgard5.rangedWeapon"}}</label>
							</span>

							<span>
								<input id="data.special" type="checkbox" name="data.special" {{checked data.special}}>
								<label for="data.special">{{localize "midgard5.special"}}</label>
							</span>
						</div>
					</td>
				</tr>
				<tr>
					<td>{{localize "midgard5.base-damage"}}</td>
					<td>
						{{#if data.defensive}}
							<span>Not available for defensive weapons</span>
						{{else}}
							<input name="data.damageBase" type="text" value="{{data.damageBase}}" data-dtype="String" />
						{{/if}}
					</td>
					
					<td>{{localize "midgard5.weapon-skill"}}</td>
					<td>
						{{#if data.calc.combatSkills}}
							<select class="select-skill" name="data.skillId" data-type="String">
								{{#select data.skillId}}
									<option value="">{{localize "midgard5.no-skill"}}</option>
									{{#each data.calc.combatSkills as |skill key|}}
										<option value="{{key}}">{{skill.label}}</option>
									{{/each}}
								{{/select}}
							</select>
						{{else}}
							<span>{{localize "midgard5.assignItemToCharacter"}}</span>
						{{/if}}
					</td>
				</tr>
				<tr>
					<td>{{localize "midgard5.attackBonus"}}</td>
					<td><input name="data.stats.attackBonus" type="text" value="{{data.stats.attackBonus}}" data-dtype="Number" /></td>
					<td>{{localize "midgard5.damageBonus"}}</td>
					<td><input name="data.stats.damageBonus" type="text" value="{{data.stats.damageBonus}}" data-dtype="Number" /></td>
				</tr>
			</tbody>
		</table>
		
		{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}

		{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
	</div>
</form>