@if (!isLoading && character) { {{ character.name }} } @else if (!isLoading && error) { Error } @else { } @if (isLoading) {

Loading character...

} @else if (error) {

{{ error }}

Back to Characters
} @else if (character) {
{{ character.name.charAt(0) }}
{{ character.name }} {{ character.race?.name }} {{ character.class?.name }}
Level {{ character.level }} @if (character.background?.name) { {{ character.background?.name }} } @if (character.alignment?.name) { {{ character.alignment?.name }} }
@for (key of abilityKeys; track key) {
{{ abilityNames[key] }}
{{ character.abilityScores[key].score }}
}
@for (tab of tabs; track tab.value) { }
@if (selectedSegment === 'combat') {
HP
{{ character.hitPoints.current || 0 }}/{{ character.hitPoints.maximum || 0 }}
AC
{{ character.armorClass || 10 }}
Initiative
Proficiency
Speed
{{ character.speed || 30 }}ft
Saving Throws @for (key of abilityKeys; track key) { {{ abilityNames[key] }} }
} @if (selectedSegment === 'skills') {
Skills @for (skill of getAllSkills(); track skill.name) { @if (skill.bonus.proficient) { } @else { } {{ skill.name }}

{{ abilityNames[skill.bonus.abilityKey || 'str'] }}

} @empty { No skills data available }
Proficiencies @if (character.class?.proficiencies) { @for (prof of character.class?.proficiencies; track prof.index) { {{ prof.name }} } } @else { No proficiencies } Languages
@if (character.languages) { @for (lang of character.languages; track lang.index) { {{ lang.name }} } } @else { No languages }
} @if (selectedSegment === 'equipment') {
Inventory
{{ character.currency.gp || 0 }} GP {{ character.currency.sp || 0 }} SP {{ character.currency.cp || 0 }} CP
Manage Currency
@if (character.equipment && character.equipment.length > 0) { @for (item of character.equipment; track $index; let i = $index) { {{ item.equipment.name || "Unknown Item" }} @if (item.quantity && item.quantity > 1) {

Quantity: {{ item.quantity }}

}
} } @else { No equipment }
} @if (selectedSegment === 'features') {
Racial Traits @if (character.racialTraits) { @for (trait of character.racialTraits; track trait.index) { {{ trait.name }}

{{ getTraitDescription(trait) }}

} } @else { No racial traits }
Class Features @if (character.class?.spellcasting) { Spellcasting

Ability: {{ character.class?.spellcasting?.spellcasting_ability?.name }}

@for (info of character.class?.spellcasting?.info; track info.name) {
{{ info.name }}
@for (desc of info.desc; track desc) {

{{ desc }}

} }
} @else { No class features available }
Background Feature @if (character.backgroundFeatures && character.backgroundFeatures.length > 0) { @for (feature of character.backgroundFeatures; track feature.name) { {{ feature.name }} } } @else { No background features }
} @if (selectedSegment === 'background') {
Character Details @if (character.desc) {

Description

{{ character.desc }}

}

Personality Traits

{{ character.personality || 'None specified' }}

Ideals

{{ character.ideals || 'None specified' }}

Bonds

{{ character.bonds || 'None specified' }}

Flaws

{{ character.flaws || 'None specified' }}

Race Information @if (character.race) {

Size

{{ character.race.size }}

{{ character.race.size_description }}

Age

{{ character.race.age || 'Not specified' }}

Alignment Tendency

{{ character.race.alignment || 'Not specified' }}

} @else { No race information available }
}
}