<form class="{{cssClass}} flexcol" autocomplete="off">

    {{!-- Item Sheet Header --}}
    <header class="sheet-header flexrow">
        <img class="profile" src="{{item.img}}" data-tooltip="{{item.name}}" data-edit="img"/>

        <div class="header-details flexrow">
            <h1 class="charname">
                <input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'DND5E.ClassName' }}"/>
            </h1>

            <div class="item-subtitle">
                <h4 class="item-type">{{itemType}}</h4>
                <span class="item-status">{{itemStatus}}</span>
            </div>

            <ul class="summary flexrow">
                <li>
                    {{> "dnd5e.item-source"}}
                </li>
            </ul>
        </div>
    </header>

    {{!-- Item Sheet Navigation --}}
    <nav class="sheet-navigation tabs" data-group="primary">
        <a class="item active" data-tab="description">{{ localize "DND5E.Description" }}</a>
        <a class="item" data-tab="details">{{ localize "DND5E.Details" }}</a>
        <a class="item" data-tab="advancement">{{ localize "DND5E.AdvancementTitle" }}</a>
    </nav>

    {{!-- Item Sheet Body --}}
    <section class="sheet-body">

        {{!-- Description Tab --}}
        <div class="tab flexrow active" data-group="primary" data-tab="description">
            {{editor enriched.description target="system.description.value" button=true editable=editable
                     engine="prosemirror" collaborate=false}}
        </div>

        {{!-- Details Tab --}}
        <div class="tab details" data-group="primary" data-tab="details">

            {{!-- Identifier --}}
            <div class="form-group">
                <label>{{ localize "DND5E.Identifier" }}</label>
                <div class="form-fields">
                    <input type="text" name="system.identifier" value="{{ system.identifier }}"
                           placeholder="{{ item.identifier }}">
                </div>
                <p class="hint">
                    {{{ localize "DND5E.ClassIdentifierHint" identifier=item.identifier }}}
                    {{ localize "DND5E.IdentifierError" }}
                </p>
            </div>

            {{!-- Class Hit Dice --}}
            <div class="form-group">
                <label>{{localize "DND5E.HitDice"}}</label>
                <div class="form-fields">
                    <select name="system.hd.denomination">
                        {{#select system.hd.denomination}}
                        {{#each config.hitDieTypes}}
                        <option value="{{this}}">{{this}}</option>
                        {{/each}}
                        {{/select}}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label>{{localize "DND5E.CLASS.FIELDS.hd.spent.label"}}</label>
                <div class="form-fields">
                    {{numberInput system.hd.spent name="system.hd.spent" placeholder="0"}}
                </div>
            </div>

            {{!-- Spellcasting --}}
            <h3 class="form-header">{{localize "DND5E.Spellcasting"}}</h3>
            {{> "dnd5e.item-spellcasting"}}

            {{!-- Starting Equipment --}}
            <h3 class="form-header">
                {{ localize "DND5E.StartingEquipment.Title" }}
                <a class="config-button" data-action="starting-equipment"
                   data-tooltip="DND5E.StartingEquipment.Action.Configure"
                   aria-label="{{ localize 'DND5E.StartingEquipment.Action.Configure' }}">
                    <i class="fa-solid fa-gear" aria-hidden="true"></i>
                </a>
            </h3>
            {{#with system.startingEquipmentDescription}}{{{ this }}}{{else}}{{ localize "None" }}{{/with}}
            <div class="form-group">
                <label>{{ localize "DND5E.StartingEquipment.Wealth.Label" }}</label>
                <div class="form-fields">
                    <input type="text" name="system.wealth" value="{{ system.wealth }}">
                </div>
                <p class="hint">{{ localize "DND5E.StartingEquipment.Wealth.Hint" }}</p>
            </div>

        </div>

        {{!-- Advancement Tab --}}
        {{> "dnd5e.item-advancement"}}

    </section>
</form>
