<div class="section magic-base">
   {{#if showMagic}}
  	<div class="attributes vertical">
		<div class="attribute" augmented-ui="b-clip-x exe">
			<p>{{localize "attrib.mag" }}</p>
			<span>{{system.attributes.mag.pool}}</span>
			<input name="magicAttributePool" type="hidden" data-dtype="Number" data-field="system.attributes.mag.pool" value="{{system.attributes.mag.pool}}" />
			<div class="field {{id}}Changed">
				<label>{{localize 'shadowrun6.numerical.base'}}</label>
				<input name="magicAttributeBase" type="number" data-dtype="Number" data-field="system.attributes.mag.base" value="{{system.attributes.mag.base}}" placeholder="base" title="{{localize 'shadowrun6.numerical.baseString'}}" min="1" max="6" />
			</div>
			<div class="field {{id}}Changed">
				<label>{{localize 'shadowrun6.numerical.mod'}}</label>
				<input name="magicAttributeMod" type="number" data-dtype="Number" data-field="system.attributes.mag.mod" value="{{system.attributes.mag.mod}}" placeholder="±adj" title="{{attribute.modString}}" />
			</div>
		</div>
		<div class="attribute special">
			<p>{{localize "attrib.initiation" }}</p>
			<input class="span" name="magicInitiation" data-dtype="Number" data-field="system.attributes.mag.initiation" value="{{system.attributes.mag.initiation}}"/>
		</div>
   </div>
   {{/if}}
	<div class="section" style="margin-right: 0px;">
		<table style="margin-top: 0; margin-bottom:0;">
			<tr>
				<td colspan="2"><div style="font-weight: bold; margin-bottom: 4px;">{{localize "shadowrun6.tradition.attribute"}}</div></td>
				<td colspan="3">
					<select name="traditionAttribute" data-field="system.tradition.attribute" style="margin-bottom: 4px;">
						{{selectOptions config.tradition_attributes localize="true" selected=system.tradition.attribute}}
      				</select>
				</td>
			</tr>
			<tr>
				<th style="padding: 0 5px 0 5px; text-align: left;">{{ localize 'shadowrun6.label.trait_pool' }}</th>
				<th style="padding: 0 5px 0 5px;">{{ localize 'shadowrun6.label.base' }}</th>
				<th style="padding: 0 5px 0 5px;">{{ localize 'shadowrun6.label.modifier' }}</th>
				<th style="padding: 0 5px 0 5px;">{{ localize 'shadowrun6.label.value' }}</th>
				<th style="padding: 0 5px 0 5px;"> </th>
			</tr>
			<tr>
				<td ><b>{{ localize 'shadowrun6.attack_rating.astral' }}</b></td>
				<td class="centered">{{system.attackrating.astral.base}}</td>
				<td class="centered"><input name="magicArAstralMod" class="centered" data-field="system.attackrating.astral.mod" type="text" value="{{system.attackrating.astral.mod}}" data-dtype="Number" style="width: 2em"></td>
				<td class="centered" title="{{system.attackrating.astral.modString}}">{{system.attackrating.astral.pool}}</td>
			</tr>
			<tr>
				<td ><b>{{ localize 'shadowrun6.defense_rating.astral' }}</b></td>
				<td class="centered">{{system.defenserating.astral.base}}</td>
				<td class="centered"><input name="magicDrAstralMod" class="centered" data-field="system.defenserating.astral.mod" type="text" value="{{system.defenserating.astral.mod}}" data-dtype="Number" style="width: 2em"></td>
				<td class="centered" title="{{system.defenserating.astral.modString}}">{{system.defenserating.astral.pool}}</td>
			</tr>
			<tr>
				<td ><b>{{ localize 'shadowrun6.defense.drain' }}</b></td>
				<td class="centered">{{system.defensepool.drain.base}}</td>
				<td class="centered"><input name="magicDpAstralMod" class="centered" data-field="system.defensepool.drain.mod" type="text" value="{{system.defensepool.drain.mod}}" data-dtype="Number" style="width: 2em"></td>
				<td class="centered" title="{{system.defensepool.drain.modString}}">{{system.defensepool.drain.pool}}</td>
				<td><a class="item-control defense-roll skill-pool" data-pool="{{system.defensepool.drain.pool}}" data-roll-id="drain"><i class="fas fa-dice-six"></i></a></td>
			</tr>
		</table>
	</div>
</div>