<div class="tab main sheet-part" data-group="sheet" data-tab="main">
  {{!-- Toggle Edit/Play --}}
  <div class="sheet-header-toggle">
    {{#if isEditMode}}
      <button type="button" data-action="toggleSheet">{{localize "VERMINE.playMode"}}</button>
    {{else}}
      <button type="button" data-action="toggleSheet">{{localize "VERMINE.editMode"}}</button>
    {{/if}}
  </div>

  {{!-- HEADER --}}
  <header class="char-header grid grid-12col w-full">
    <div class="grid-span-2 community-portrait">
      <img class="profile-img" src="{{actor.img}}" data-action="editImage" data-edit="img" width="110"
        height="110" title="{{actor.name}}" />
    </div>

    <section class="char-details grid-span-6">
      <h1 class="char-name flexrow flex-group-left w-full">
        <label>{{ localize 'IDENTITY.name' }}</label>
        {{#if isEditMode}}
        <input name="name" type="text" value="{{actor.name}}" placeholder="{{ localize 'COMMUNITY.name_placeholder' }}" />
        {{else}}
        <span>{{actor.name}}</span>
        {{/if}}
      </h1>
      <div class="profile flexrow flex-group-center">
        <label>{{ localize 'IDENTITY.profile' }}</label>
        {{#if isEditMode}}
        <input name="system.identity.profile" type="text" value="{{system.identity.profile}}" data-dtype="String" />
        {{else}}
        <span>{{#if system.identity.profile}}{{system.identity.profile}}{{else}}{{ localize 'COMMUNITY.profile_hint' }}{{/if}}</span>
        {{/if}}
      </div>
      <div class="origin flexrow flex-group-center">
        <label>{{ localize 'COMMUNITY.origin' }}</label>
        {{#if isEditMode}}
        <input name="system.identity.origin" type="text" value="{{system.identity.origin}}" data-dtype="String" />
        {{else}}
        <span>{{system.identity.origin}}</span>
        {{/if}}
      </div>
    </section>

    <section class="char-level grid-span-4">
      <h1 class="char-vermine2047 flexrow flex-group-left w-full">
        {{#if (eq system.identity.totem "")}}
        <a data-action="chooseTotem" class="chooseTotem">{{ localize 'COMMUNITY.choose_totem' }}&hellip;</a>
        {{ else }}
        <a data-action="chooseTotem" class="chooseTotem">{{ smarttl "TOTEMS" system.identity.totem }}</a>
        {{/if}}
      </h1>
      <div class="level flexrow flex-group-center">
        <label>{{ localize 'VERMINE.level' }}</label>
        {{#if isEditMode}}
        <input name="system.level.value" type="number" value="{{system.level.value}}" data-dtype="Number" min="{{system.level.min}}" max="{{system.level.max}}" />
        {{else}}
        <span>{{system.level.value}}</span>
        {{/if}}
        <span>/ {{system.level.max}}</span>
      </div>
    </section>
  </header>

  {{#if resolvedGroup}}
  <div class="community-linked-group">
    <span class="label">{{ localize 'COMMUNITY.linked_group' }}:</span>
    <span class="value">{{ resolvedGroup.name }}</span>
  </div>
  {{/if}}
</div>
