<?= $this->layout('_layout', ['title' => $title]); ?>

<main class="main">
    <?= $this->insert('includes/aside_info') ?>
    <div class="content">
        <div class="h2-title h2-title-content flex-s-c">
            <span>New Ticket</span>
        </div>

        <div class="_links">
            <a class="button" href="<?= __redirect("user/ticket") ?>">Come back</a>
        </div>


        <div class="information">
            <p><strong>Tickets</strong> are responded to within <strong>24 hours</strong>.</p>
            <p><strong>Tickets are only removed by the administration within 24 hours after there are no further responses.</strong></p>
        </div>

        <div class="p-2 bg-neutral-200">
            <form action="<?= __redirect("user/auth/ticket/new") ?>" method="post" enctype="multipart/form-data">
                <?= __csrf(); ?>
                <div class="fields">
                    <div class="fieldGroup">
                        <span>Subject</span>
                        <input type="text" name="subject" autocomplete="off" required minlength="10" maxlength="80">
                    </div>

                    <p>Imagem <sup>(não é obrigatório)</sup></p>
                    <div>
                        <div class="fieldGroup">
                            <span>PNG, JPG or GIF (MAX. 800x400px)</span>
                            <input id="dropzone-file" type="file" name="image" class="hidden" />
                        </div>
                    </div>

                    <div class="fieldGroup">
                        <span>Message</span>
                        <textarea cols="30" rows="4" name="message" required minlength="10" maxlength="1000"></textarea>
                    </div>
                </div>

                <button type="submit">Open</button>
            </form>
        </div>


    </div>
</main>