<?= partial('rates') ?>

<form data-ajax action="<?= url_to('/panel/character/' . $character->getName() . '/redistribute-points') ?>" class="form" method="post">
    <?= csrf_field() ?>

    <div class="box-panel">
        <div class="box-panel-title"><?= __('Redistribute points') ?></div>
        <div class="box-panel-content">

            <table class="list panel">
                <tbody>
                    <tr>
                        <td><?= __('Points') ?></td>
                        <td><?= util('Number')->format($character->getPoints()) ?></td>
                    </tr>
                    <tr>
                        <td><?= __('Strength') ?></td>
                        <td><?= util('Number')->format($character->getStrength()) ?></td>
                    </tr>
                    <tr>
                        <td><?= __('Agility') ?></td>
                        <td><?= util('Number')->format($character->getAgility()) ?></td>
                    </tr>
                    <tr>
                        <td><?= __('Vitality') ?></td>
                        <td><?= util('Number')->format($character->getVitality()) ?></td>
                    </tr>
                    <tr>
                        <td><?= __('Energy') ?></td>
                        <td><?= util('Number')->format($character->getEnergy()) ?></td>
                    </tr>
                    <?php if (util('Character')->isClass($character->getClass(), ['DL', 'LE'])): ?>
                        <tr>
                            <td><?= __('Command') ?></td>
                            <td><?= util('Number')->format($character->getCommand()) ?></td>
                        </tr>
                    <?php endif ?>
                    <tr>
                        <td><?= __('Total points') ?></td>
                        <td><?= util('Number')->format($totalPoints) ?></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="submit">
            <input type="submit" class="btn" value="<?= __('Redistribute') ?>">
        </div>
    </div>
</form>