{{!-- Iterate through all attributes on the item and output buttons for any that are formula. --}}
{{#each item.data.attributes as |itemAttr key|}}
{{#if itemAttr.dtype}}
{{#if itemAttr.isFormula}}
{{!-- Use the items.name.key format for shorthand. --}}
{{#if ../../shorthand}}
{{!-- Use the items.name.attributes.key.value format otherwise. --}}
{{else}}
{{/if}}
{{/if}}
{{else}}
{{#each itemAttr as |itemGroupedAttr groupedKey|}}
{{#if itemGroupedAttr.isFormula}}
{{!-- Use the items.name.key format for shorthand. --}}
{{#if ../../../shorthand}}
{{!-- Use the items.name.attributes.key.value format otherwise. --}}
{{else}}
{{/if}}
{{/if}}
{{/each}}
{{/if}}
{{/each}}
{{/each}}
{{!-- Attributes Tab --}}
{{localize "SIMPLE.AttributeKey"}}{{localize "SIMPLE.AttributeValue"}}{{localize "SIMPLE.AttributeLabel"}}{{localize "SIMPLE.AttributeDtype"}}
{{!-- Render the attribute list partial. --}}
{{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=data.ungroupedAttributes dtypes=dtypes}}
{{!-- Render the grouped attributes partial and control. --}}