<?php
    /**
     * Skillup report filter view.
     *
     * To be included from the skillup report view.
     *
     * @category View
     * @property_read mixed[] $filters Selected filters.
     * @property_read int $page Player ID.
     */

    namespace swdb;
?>
<form action='/<?=$UID?>/report/skillup/' method='get' id='filter_skillup' class='filter'>
    <table>
        <tr>
            <td class='filter' id='filter_stars'>
                <span>Stars:</span>
                <input type='number' name='min_stars' min='1' max='6' value='<?=$filters["MIN_STARS"]?>'/>
                -
                <input type='number' name='max_stars'  min='1' max='6' value='<?=$filters["MAX_STARS"]?>'/>
            </td>
            <td class='filter' id='filter_stars'>
                <span>Natural stars:</span>
                <input type='number' name='min_natural_stars' min='1' max='5' value='<?=$filters["MIN_NATURAL_STARS"]?>'/>
                -
                <input type='number' name='max_natural_stars' min='1' max='5' value='<?=$filters["MAX_NATURAL_STARS"]?>'/>
            </td>
        </tr>
        <tr>
            <td class='filter' colspan='2'>
<?php
                $checked = "";
                if ($filters["FAMILY"]){
                    $checked = "checked";
                }
?>
                <input type='checkbox' name='family' id='filter_family' <?=$checked?>/>
                <label for='filter_family'>Show monsters with family with lower grade.</label>
            </td>
        </tr>
        <tr>
            <td class='filter' colspan='2'>
<?php
                $checked = "";
                if ($filters["2A"]){
                    $checked = "checked";
                }
?>
                <input type='checkbox' name='2a' id='filter_2a'<?=$checked?>/>
                <label for='filter_2a'>Include second-awakened monsters.</label>
            </td>
        </tr>
        <tr>
            <td class='filter' colspan='2'>
<?php
                $checked = "";
                if ($filters["HOMUNCULUS"]){
                    $checked = "checked";
                }
?>
                <input type='checkbox' name='homunculus' id='filter_homunculus' <?=$checked?>/>
                <label for='filter_homunculus'>Include Homunculus.</label>
            </td>
        </tr>
        <tr>
            <td class='filter' colspan='2'>
<?php
                $checked = "";
                if ($filters["IN_STORAGE"]){
                    $checked = "checked";
                }
?>
                <input type='checkbox' name='in_storage' id='filter_in_storage' <?=$checked?>/>
                <label for='filter_in_storage'>Show monsters in storage.</label>
            </td>
        </tr>
        <tr>
            <td class='filter' colspan='2'>
<?php
                $checked = "";
                if ($filters["WITHOUT_RUNES"]){
                    $checked = "checked";
                }
?>
                <input type='checkbox' name='without_runes' id='filter_without_runes' <?=$checked?>/>
                <label for='filter_without_runes'>Show monsters without runes.</label>
            </td>
        </tr>
        <tr>
            <td class='filter' colspan='2'>
<?php
                $checked = "";
                if ($filters["MAXED"]){
                    $checked = "checked";
                }
?>
                <input type='checkbox' name='maxed' id='filter_maxed' <?=$checked?>/>
                <label for='filter_maxed'>Show fully skilled-up monster</label>
            </td>
        </tr>
    </table>
    <div id='filter_apply'>
        <input type='submit' value='Apply'/>
    </div>
</form>
