<?php if (!empty($authPage)): ?>
            </div>
        </section>
    </main>
<?php else: ?>
            </section>
        </main>
    </div>
<?php endif; ?>
<?php if (!empty($user)): ?>
    <div class="session-timeout-backdrop" id="sessionWarningModal" hidden aria-hidden="true">
        <section class="session-timeout-dialog card" role="dialog" aria-modal="true" aria-labelledby="sessionWarningTitle" aria-describedby="sessionWarningDescription" tabindex="-1">
            <span class="badge badge-warning">Upozorenje o sesiji</span>
            <h2 id="sessionWarningTitle">Da li još uvek radite na sistemu?</h2>
            <p id="sessionWarningDescription" class="muted">Sesija će biti automatski zatvorena ako ne izaberete jednu od ponuđenih opcija.</p>
            <div class="session-timeout-countdown" aria-live="polite" aria-atomic="true">
                <span>Preostalo vreme</span>
                <strong id="sessionWarningRemainingSeconds"><?= (int)session_warning_duration_seconds() ?></strong>
                <small>sekundi</small>
            </div>
            <div class="session-timeout-actions">
                <button type="button" class="button button-primary" id="sessionExtendButton">Produži rad</button>
                <button type="button" class="button button-light" id="sessionLogoutButton">Odjava</button>
            </div>
            <p class="session-timeout-status" id="sessionTimeoutStatus" role="status" aria-live="polite"></p>
        </section>
    </div>
<?php endif; ?>
</body>
</html>
