<!DOCTYPE html>
<html th:lang="${#locale.toString()}" th:lang-direction="#{language.direction}" xmlns:th="http://www.thymeleaf.org">


<th:block th:insert="~{fragments/common :: head(title=#{compress.title})}"></th:block>


<body>
    <th:block th:insert="~{fragments/common :: game}"></th:block>
    <div id="page-container">
        <div id="content-wrap">
            <div th:insert="~{fragments/navbar.html :: navbar}"></div>
            <br> <br>
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-md-6">
                        <h2 th:text="#{compress.header}"></h2>
                        <form action="#" th:action="@{/compress-pdf}" method="post" enctype="multipart/form-data">
                            <div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
                            <div class="card mb-3">
                                <div class="card-body">
                                    <h4 th:text="#{compress.selectText.1}"></h4>
                                    <label for="optimizeLevel" th:text="#{compress.selectText.2}"></label>
                                    <select name="optimizeLevel" id="optimizeLevel" class="form-control">
                                        <option value="1">1</option>
                                        <option value="2" selected>2</option>
                                        <option value="3">3</option>
                                        <option value="4" th:text="#{compress.selectText.3}"></option>
                                    </select>
                                </div>
                            </div>
                            
                            <div class="card mb-3">
                                <div class="card-body">
                                    <h4 th:text="#{compress.selectText.4}"></h4>
                                    <label for="expectedOutputSize" th:text="#{compress.selectText.5}"></label>
                                    <input type="text" name="expectedOutputSize" id="expectedOutputSize" min="1" class="form-control">
                                </div>
                            </div>
                            <button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{compress.submit}"></button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div th:insert="~{fragments/footer.html :: footer}"></div>
    </div>
</body>

</html>