<div id='skills' class='gga-table with-notes'>
	<div class='itemmenu header' readonly></div>
	<div class='desc header'>
		<div class='headermenu'>
			<span>{{localize 'GURPS.skills'}}</span>
			<i class='fas fa-caret-square-down'></i>
		</div>
	</div>
	<div class='sl header'>{{localize 'GURPS.sl'}}</div>
	<div class='rsl header'>{{localize 'GURPS.rsl'}}</div>
	<div class='pts header'>{{localize "GURPS.abbrevPoints"}}</div>
	<div class='ref header'>{{localize "GURPS.abbrevRef"}}</div>

	{{#each (flatlist system.skills)}}
	{{#if ../isEditing}}
	<div class='itemmenu skillmenu' data-key='system.skills.{{@key}}'>
		<i class='fas fa-times'></i>
	</div>

	<div class='desc indent{{indent}}' data-key='system.skills.{{@key}}'>
		<input name='system.skills.{{@key}}.name' class='gcs-input' type='text' value='{{this.name}}' />
		<div class='list_note'>
			<input name='system.skills.{{@key}}.notes' class='gcs-input' type='text' value='{{this.notes}}' />
		</div>
	</div>

	<div class='sl' data-key='system.skills.{{@key}}'>
		<input name='system.skills.{{@key}}.import' class='gcs-input-sm3' type='text' value='{{this.import}}' />
	</div>
	<div class='rsl' data-key='system.skills.{{@key}}'>
		<input name='system.skills.{{@key}}.relativelevel' class='gcs-input-sm4' type='text'
			value='{{this.relativelevel}}' />
	</div>
	<div class='pts' data-key='system.skills.{{@key}}'>
		<input name='system.skills.{{@key}}.points' class='gcs-input-sm3' type='text' value='{{this.points}}' />
	</div>
	<div class='ref' data-key='system.skills.{{@key}}'>
		<input name='system.skills.{{@key}}.pageref' class='gcs-input-sm5' type='text' value='{{this.pageref}}' />
	</div>
	{{else}}
	{{#unless isCollapsed}}
	<div class='itemmenu' readonly></div>

	<div class='skldraggable' data-key='system.skills.{{@key}}'>
    <div class="gga-line-description">
      {{#if (showItemImage this)}}<div><img class="gga-item-image-thumb skills" src='{{getItemImage this}}' /></div>{{/if}}
      <div class='desc dblclkedit indent{{indent}}'>
        <div class='gga-desc-text'>
          <div>
            {{#if hasContains}}<i class='fas fa-caret-down expandcollapseicon'></i>{{/if}}
            {{#if hasCollapsed}}<i class='fas fa-caret-right expandcollapseicon'></i>{{/if}}
          </div>
          <div class='tooltip gga-manual'>
            {{{gurpslink this.name}}}
            {{#if (displayItemHover this)}}
            <div class='tooltiptext gga-manual'><img class="gga-tooltip-item-image" src='{{getItemImage this}}' /></div>
            {{/if}}
          </div>
          <div>
            {{#if (isFoundryGlobalItem this)}}
            <i class='fas fa-book tooltip gga-global-item'>
              <span class='tooltiptext'>{{{globalItemTooltip this}}}</span>
            </i>
            {{/if}}
          </div>
          <div>
            {{#if (isImportedItem this)}}
            <i class='fas fa-layer-group tooltip gga-child-item'>
              <span class='tooltiptext'>{{{parentItemTooltip this}}}</span>
            </i>
            {{/if}}
          </div>
          <div>
            {{#if (isFoundryItem this)}}
            <i class='fas fa-star tooltip gga-item'>
              <span class='tooltiptext'>{{localize "GURPS.equipmentFoundryItem"}}</span>
            </i>
            {{/if}}
          </div>
        </div>
        <div class='list_note'>
          {{{gurpslink this.notes @root}}}
        </div>
      </div>
    </div>
	</div>

	<div class='sl {{rollable this.level}} flex-center' data-name='{{this.name}}' data-key='system.skills.{{@key}}'
		data-otf='Sk:"{{this.name}}"'>
		{{this.level}}
	</div>
	<div class='rsl {{rollable this.level}} flex-center' data-otf='Sk:"{{this.name}}"'>{{this.relativelevel}}</div>
	<div class='pts flex-center'>{{this.points}}</div>
	<div class='ref flex-center'>{{{pdflinkext this}}}</div>
	{{/unless}}
	{{/if}}
	{{/each}}
</div>
