<div>
    <div class="row">
        <div class="col-lg-4">
            <form wire:submit.prevent="<?php echo e($aksi); ?>">
                <div class="card">
                    <div class="card-body">
                        <div class="mb-3">
                            <label for="judul" class="form-label">Judul <span class="text-danger">*</span></label>
                            <input type="text" name="judul" id="judul" wire:model="judul" class="form-control">
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['judul'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger error-validation">
                                    <?php echo e($message); ?>

                                </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <div class="mb-0">
                            <div x-data="{ uploading: false, progress: 0 }" x-on:livewire-upload-start="uploading = true"
                                x-on:livewire-upload-finish="uploading = false"
                                x-on:livewire-upload-cancel="uploading = false"
                                x-on:livewire-upload-error="uploading = false"
                                x-on:livewire-upload-progress="progress = $event.detail.progress">
                                <label for="file_<?php echo e($iter); ?>" class="form-label">File <span
                                        class="text-danger">*</span></label>
                                <input type="file" name="file" id="file_<?php echo e($iter); ?>" wire:model="file"
                                    class="form-control">
                                <div x-show="uploading">
                                    <progress max="100" x-bind:value="progress" style="width:100%"></progress>
                                </div>
                            </div>
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger error-validation">
                                    <?php echo e($message); ?>

                                </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <div class="mt-2 mb-0">
                            <p class="text-muted mb-0">
                                File yang diupload berukuran maksimal <code>12 Mb</code>
                            </p>
                        </div>
                    </div>
                    <div class="card-footer">
                        <div class="d-flex">
                            <div wire:loading.remove wire:target="reset_fields">
                                <button type="button" wire:click="reset_fields"
                                    class="btn btn-danger me-2">Reset</button>
                            </div>
                            <div wire:loading wire:target="reset_fields">
                                <button class="btn btn-danger me-2" type="button" disabled="">Loading..
                                </button>
                            </div>
                            <div wire:loading.remove wire:target="<?php echo e($aksi); ?>">
                                <button type="submit" class="btn btn-success me-2">Simpan</button>
                            </div>
                            <div wire:loading wire:target="<?php echo e($aksi); ?>">
                                <button class="btn btn-success me-2" type="button" disabled="">Loading..
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="col-lg-8">
            <div class="card">
                <div class="card-body p-0">
                    <div class="table-responsive">
                        <table class="table table-striped-columns mb-0 text-center">
                            <thead class="table-light">
                                <tr>
                                    <th width="1%">No.</th>
                                    <th class="min-w-250px">Judul</th>
                                    <th width="5%">Status</th>
                                    <th width="5%">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $res): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td><?php echo e($i + 1); ?>.</td>
                                        <td><?php echo e($res->judul); ?></td>
                                        <td>
                                            <div class="d-flex justify-content-center">
                                                <label class="form-check form-switch form-switch-md ms-3"
                                                    for="setStatus_<?php echo e($res->id); ?>">
                                                    <input type="checkbox" class="form-check-input"
                                                        id="setStatus_<?php echo e($res->id); ?>" onclick="set_status(this)"
                                                        value="<?php echo e($res->id); ?>"
                                                        data-to-status="<?php echo e($res->is_active == 0 ? 1 : 0); ?>"
                                                        <?php echo e($res->is_active ? 'checked' : ''); ?>>
                                                </label>
                                            </div>
                                        </td>
                                        <td>
                                            <div wire:key="kategori-post_<?php echo e($res->id); ?>">
                                                <div class="btn-group">
                                                    <button class="btn btn-primary btn-sm dropdown-toggle"
                                                        type="button" data-bs-toggle="dropdown" aria-haspopup="true"
                                                        aria-expanded="false">
                                                        Aksi
                                                    </button>
                                                    <div class="dropdown-menu">
                                                        <a class="dropdown-item" href="javascript:void(0)"
                                                            wire:click="edit(<?php echo e($res->id); ?>)">Edit</a>
                                                        <a class="dropdown-item" href="javascript:void(0)"
                                                            wire:click="confirm(<?php echo e($res->id); ?>)">Hapus</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="3"><strong>No Data</strong></td>
                                    </tr>
                                <?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->startPush('script'); ?>
    <script>
        function set_status(el) {
            Livewire.dispatch('set-status', {
                id: el.value,
                status: el.getAttribute('data-to-status')
            });
        }
    </script>
<?php $__env->stopPush(); ?>
<?php /**PATH /Users/aptika/Workspace/webprofilev2/resources/views/livewire/unduhan.blade.php ENDPATH**/ ?>