@using Otchinslator.Components.Layout
@layout OtchislenieLayout
@using BlazorPageScript
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]
@page "/chooseinstitut"

<PageTitle>Институт | Отчислятор 3000</PageTitle>
<PageScript Src="./Components/Pages/ChooseInstitut.razor.js"/>

<dialog id="notready_modal" class="modal modal-bottom sm:modal-middle">
    <div class="modal-box">
        <h3 class="text-lg font-bold">Сервис отчислений</h3>
        <p class="py-4">Для этого института ещё не был добавлен шаблон заявления, если Вы знаете где его найти и кому направлять заявления, свяжитесь с разработчиком<br><br>ТГ: <a target="_blank" href="https://t.me/serega404">@@serega404</a></p>
        <div class="modal-action">
            <form method="dialog">
                <button class="btn">Закрыть</button>
            </form>
        </div>
    </div>
</dialog>

<div class="relative w-96 sm:w-[32rem]">
    <div
        class="text-center font-bold text-4xl md:text-5xl w-max absolute left-1/2 -top-1/4 transform -translate-x-1/2 italic">
        <br>Выбери свой институт
    </div>
    <div class="flex flex-col space-y-4 w-96 sm:w-[32rem]">
        <div class="card rounded-badge bg-base-200 p-4">
            <div class="grid grid-cols-2 gap-4 p-4">
                <button id="1" class="institut-button btn h-auto card bg-white p-4 select-none">
                    <img src="img/iktib.png" alt="ИКТИБ" class="w-full h-32 object-contain rounded-md" draggable="false">
                    <p class="text-center mt-2">ИКТИБ</p>
                </button>
                <button id="2" onclick="notready_modal.showModal()" class="dis-institut-button btn h-auto card bg-white p-4 select-none">
                    <img src="img/irtsu.png" alt="ИРТСУ" class="w-full h-32 object-contain rounded-md" draggable="false">
                    <p class="text-center mt-2">ИРТСУ</p>
                </button>
                <button id="3" onclick="notready_modal.showModal()" class="dis-institut-button btn h-auto card bg-white p-4 select-none">
                    <img src="img/inep.png" alt="ИНЭП" class="w-full h-32 object-contain rounded-md" draggable="false">
                    <p class="text-center mt-2">ИНЭП</p>
                </button>
                <button id="4" onclick="notready_modal.showModal()" class="dis-institut-button btn h-auto card bg-white p-4 select-none">
                    <img src="img/iues.png" alt="ИУЭС" class="w-full h-32 object-contain rounded-md" draggable="false">
                    <p class="text-center mt-2">ИУЭС</p>
                </button>
            </div>
            <a href="notsupported" class="btn rounded-full bg-white mt-1 mx-4 flex-grow w-30">другой</a>
        </div>
    </div>

    <div class="text-center">
        <a href="/"
           class="relative btn rounded-full mt-4 min-h-2 min-w-2 w-10 h-10">
            <img class="absolute p-2 min-w-2 min-h-0" src="img/exit.svg" alt=""/>
        </a>
    </div>
</div>
