<style>
.block_motrain-wrapper {
    {{#accentcolor}}--motrain-accent-color: {{.}};{{/accentcolor}}
    {{#bgcolor}}--motrain-bg-color: {{.}};{{/bgcolor}}
}
</style>
<div class="block_motrain-wrapper">
    <div class="block_motrain-content">
        <div class="block_motrain-wallet block_motrain-container">
            <div class="block_motrain-wallet-balances">
                {{> block_motrain/wallet-balance }}
                {{#showtickets}}
                    {{> block_motrain/wallet-ticket-balance }}
                {{/showtickets}}
            </div>
            {{# showstore }}
            <div class="wallet-actions">
                <div class="wallet-action">
                    <a href="{{ storeurl }}" class="">
                        <div>{{#str}} spend, block_motrain {{/str}}</div>
                        <div class="action-pic">{{> block_motrain/icon-coins }}</div>
                        {{#showtickets}}
                            / <div class="action-pic">{{> block_motrain/icon-tickets }}</div>
                        {{/showtickets}}
                    </a>
                </div>
                {{# haspurchasespendingredeem }}
                <div class="wallet-action icon-only">
                    <a href="{{ purchasesurl }}" class="" title="{{# str }} pendingorders, block_motrain {{/ str }}">
                        <div class="wallet-action-badge">
                            {{^haspurchasespendingredeemmorethan9}}{{purchasespendingredeem}}{{/haspurchasespendingredeemmorethan9}}
                            {{#haspurchasespendingredeemmorethan9}}9+{{/haspurchasespendingredeemmorethan9}}
                        </div>
                        <div class="action-pic">{{> block_motrain/icon-pending-orders }}</div>
                    </a>
                </div>
                {{/ haspurchasespendingredeem }}
            </div>
            {{/ showstore }}
        </div>

        {{# showbrava }}
        <div class="block_motrain-container">
            <div style="block_motrain-brava-given">
                <div class="block_motrain-brava-given-amount">{{ bravagiven_formatted }} / {{ bravatogive_formatted }}</div>
                <div class="block_motrain-brava-given-label">{{#str}} giventhismonth, block_motrain {{/str}}</div>
            </div>
            <div class="wallet-actions">
                <div class="wallet-action">
                    <a href="{{ bravaurl }}" class="">
                        <div>{{#str}} brava, block_motrain {{/str}} 👏</div>
                    </a>
                </div>
            </div>
        </div>
        {{/ showbrava }}

        {{#level}}
        <div class="block_motrain-level">
            <div class="level-pic">
                <img src="{{ badge_url }}" alt="{{ levelnstr }}">
            </div>
            <div class="level-progress">
                <div class="progress-label">
                    {{#str}} level, block_motrain {{/str}}
                </div>
                <div class="block_motrain-progress">
                    <div aria-role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{ progress_pc }}">
                        <div></div>
                        <div style="width: {{progress_pc}}%;"></div>
                    </div>
                    <div class="progress-text">
                        <div class="text-label">
                            {{# coins_remaining }}
                                {{#str}} nextlevelin, block_motrain {{/str}} {{ coins_remaining_formatted}}
                            {{/ coins_remaining }}
                            {{^ coins_remaining }}{{#str}} maximumlevel, block_motrain {{/str}}{{/ coins_remaining }}
                        </div>
                        <div class="text-pic">{{> block_motrain/icon-coins }}</div>
                    </div>
                </div>
            </div>
        </div>
        {{/level}}
    </div>

    <nav class="block_motrain-nav">
        {{#hasplayernav}}
            <div class="nav-container">
                {{#playernav}}
                    <a href="{{url}}" class="nav-item">
                        <div class="nav-icon">{{{ icon }}}</div>
                        <div class="nav-label">{{ label }}</div>
                    </a>
                {{/playernav}}
            </div>
        {{/hasplayernav}}
        {{#hasmanagernav}}
            <div class="nav-container">
                {{#managernav}}
                    <a href="{{url}}" class="nav-item">
                        <div class="nav-icon">{{{ icon }}}</div>
                        <div class="nav-label">{{ label }}</div>
                    </a>
                {{/managernav}}
            </div>
        {{/hasmanagernav}}
        <div class="nav-container">
            <a href="{{ infourl }}" class="nav-light nav-item nav-tight">
                <div class="nav-icon">
                    {{> block_motrain/nav-icon-info }}
                </div>
                <div class="nav-label">{{#str}} infopagetitle, block_motrain {{/str}}</div>
            </a>
        </div>
    </nav>
</div>