<div x-show.transition.duration.500ms="locationPopup"
    :class="{ 'popup-hidden': !locationPopup, 'popup-visible': locationPopup }"
    class="popup" @keydown.enter="updateSelectedProductQty"
    @click.away="locationPopup = null">
    <div>
        <div>
            <h6 style="
            background: skyblue;
            color: white;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            padding: 10px 20px;" class="menu-title">Location</h6>
        </div>
        <?php if(is_null($default_location)): ?>
        <div style="margin: 35px 0;">
            <select class="form-select mt-3" name="location" id="location"
                x-model="selectedLocation" @change="setLocation($event.target.value)"  x-on:change="onLocationChange">
                <option selected value="All">Select Location</option>
                <?php $__currentLoopData = $business_locations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $location_id => $location): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($location_id); ?>" <?php echo e($location_id == $default_location ? 'selected' : ''); ?>><?php echo e($location); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
        </div>
        <?php endif; ?>
        <?php if(is_null($default_location)): ?>
        <div style="margin: 35px 0;">
            <select class="form-select mt-3" name="department" id="department"
                x-model="selectedDepartment" @change="setDepartment($event.target.value)"   x-on:change="onDepartmentChange">
                <option selected value=" ">Select Department</option>
            </select>
        </div>
        <?php else: ?>
        <div style="margin: 35px 0;">
            <select class="form-select mt-3" name="department" id="department"
                x-model="selectedDepartment" @change="setDepartment($event.target.value)"    x-on:change="onDepartmentChange">
                <option selected value="all">All</option>
                <?php $__currentLoopData = $departments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $department): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($department->id); ?>"><?php echo e($department->name); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
        </div>
        <?php endif; ?>
        <div
            style="display: flex; align-items: center; gap: 20px; justify-content: flex-end; margin-top: 20px;">
            <button type="button" class="btn btn-danger"
                @click="locationPopup = null">Close</button>
        </div>
    </div>
</div><?php /**PATH C:\xampp\htdocs\loopdigipos\resources\views/pos/location_pop.blade.php ENDPATH**/ ?>