<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AppLayout::class, []); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
  
    <div class="container">
        <div class="top-right">
            <form method="POST" action="<?php echo e(route('logout')); ?>">
                <?php echo csrf_field(); ?>
                <button type="submit">Beigt darbu</button>
            </form>
        </div>

        <div class="search-container">
            <label for="datepicker">Izvēlies datumu:</label>
            <input type="text" id="datepicker" name="date">
            <button onclick="searchByDate()">Meklēt</button>
        </div>

        <div class="entries">
            <div class="entry-row">
                <button onclick="createNewEntry()">Izveidot jaunu ierakstu</button>
                <button onclick="loadPastEntry(1)">Iepriekšējais ieraksts</button>
                <button onclick="loadPastEntry(2)">Iepriekšējais ieraksts</button>
                <button onclick="loadPastEntry(3)">Iepriekšējais ieraksts</button>
            </div>
            <div class="entry-row">
                <button onclick="loadPastEntry(4)">Iepriekšējais ieraksts</button>
                <button onclick="loadPastEntry(5)">Iepriekšējais ieraksts</button>
                <button onclick="loadPastEntry(6)">Iepriekšējais ieraksts</button>
                <button onclick="loadPastEntry(7)">Iepriekšējais ieraksts</button>
            </div>
        </div>
    </div>

    <style>
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
        }

        body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background-color: #fff;
        }

        .bg-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background-color: #f2f2f2;
        }

        .container {
            width: 100%;
            max-width: 800px;
            background-color: transparent;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            padding: 20px;
            text-align: center;
            position: relative;
        }

        .top-right {
            position: absolute;
            top: 20px;
            right: 20px;
        }

        .top-right button {
            background-color: #dc3545;
            color: #fff;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            margin-bottom: 20px;
        }

        .search-container {
            text-align: center;
            margin-bottom: 20px;
        }

        .search-container label {
            font-size: 18px;
            margin-right: 10px;
        }

        .search-container input[type="text"] {
            padding: 10px;
            font-size: 16px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }

        .search-container button {
            background-color: #007bff;
            color: #fff;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
        }

        .entries {
            margin-top: 20px;
        }

        .entry-row {
            display: flex;
            justify-content: center;
            margin-bottom: 10px;
        }

        .entry-row button {
            background-color: #28a745;
            color: #fff;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            margin: 0 5px;
        }

        #datepicker {
        padding: 12px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #fff;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        width: 200px;
        text-align: center; 
        background-color: #fff;
        
    }


    #searchButton {
        padding: 12px 20px;
        font-size: 16px;
        border: none;
        border-radius: 5px;
        background-color: #007bff;
        color: #fff;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    /* Стили для кнопки поиска при наведении */
    #searchButton:hover {
        background-color: #0056b3;
    }
    </style>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
    <script>
        $(function() {
            $("#datepicker").datepicker({
                dateFormat: "yy-mm-dd"
            });
        });

        function createNewEntry() {
            console.log("Izveidojam jaunu ierakstu");
            window.location.href = "<?php echo e(route('entry_creation_page')); ?>";
        }

        function loadPastEntry(entryNumber) {
            console.log("Atveram iepriekšējo ierakstu Nr. " + entryNumber);
        }

        function searchByDate() {
            const date = $('#datepicker').val();
            if (date) {
                window.location.href = "<?php echo e(route('search_entries')); ?>?date=" + date;
            } else {
                alert('Lūdzu, izvēlies datumu!');
            }
        }
    </script>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\danielspke\resources\views/dashboard.blade.php ENDPATH**/ ?>