<?php $__env->startSection('content'); ?>

<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">

                <div class="card card-primary">

                    
                <div class="card-header"
                        style="
                            display:flex;
                            flex-wrap:wrap;
                            align-items:center;
                            justify-content:center;
                            gap:10px;
                            position:relative;
                            padding:15px;
                        ">

                        <!-- Title -->
                        <h3 style="
                            font-weight:700;
                            font-size:30px;
                            padding-bottom:6px;
                            border-bottom:3px solid #dd2e07;
                            margin:0;
                            text-align:center;
                            flex:1 1 100%;
                        ">
                            Update Catagory
                        </h3>

                        <!-- Back Button -->
                        <a href="<?php echo e(route('catagory.index')); ?>"
                        class="btn btn-primary"
                        style="
                            flex:0 0 auto;
                        ">
                            <i class="fas fa-arrow-left"></i> Back
                        </a>

                    </div>

                    
                    <form action="<?php echo e(route('catagory.update', $catagory->id)); ?>" method="POST" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('PUT'); ?>

                        <div class="card-body">

                            <div class="row">
                                
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label style="font-size:20px; font-weight:600;">Image</label>
                                        <input type="file" name="image" class="form-control" accept="image/*">
                                        <?php $__errorArgs = ['image'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                                        <?php if($catagory->image): ?>
                                            <img src="<?php echo e(asset($catagory->image)); ?>" class="mt-2" width="120">
                                        <?php endif; ?>
                                    </div>
                                </div>

                                   <div class="col-md-6">
                                    <div class="form-group">
                                        <label style="font-size:20px; font-weight:600;">Title</label>
                                        <input type="text" name="title" value="<?php echo e(old('title', $catagory->title)); ?>" class="form-control" placeholder="Enter Title">
                                        <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </div>
                                </div>

                            </div>

                            <div class="row">
                                  <div class="col-md-12">
                                            <div class="form-group">
                                                <label style="font-size:20px; font-weight:600;">Book Link</label>
                                                <input type="text" name="amazon_link" value="<?php echo e(old('amazon_link', $catagory->amazon_link)); ?>" class="form-control" placeholder="Enter Amazon Link">
                                                <?php $__errorArgs = ['amazon_link'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                            </div>
                                        </div>
                            </div>






                            <div class="row">
                                      <div class="col-md-4">
                                    <div class="form-group">
                                        <label style="font-size:20px; font-weight:600;">Alt text</label>
                                        <input type="text" name="alt_text" value="<?php echo e(old('alt_text', $catagory->alt_text)); ?>" class="form-control" placeholder="Enter Alt Text">
                                        <?php $__errorArgs = ['alt_text'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </div>
                                </div>


                                
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label style="font-size:20px; font-weight:600;">Priority</label>
                                        <input type="number" name="priority" value="<?php echo e(old('priority', $catagory->priority)); ?>" class="form-control" placeholder="Enter Priority" min="0">
                                        <?php $__errorArgs = ['priority'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </div>
                                </div>

                                
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label style="font-size:20px; font-weight:600;">Status</label>
                                        <select name="status" class="form-control">
                                            <option value="">Choose</option>
                                            <option value="1" <?php echo e(old('status', $catagory->status) == 1 ? 'selected' : ''); ?>>Active</option>
                                            <option value="2" <?php echo e(old('status', $catagory->status) == 2 ? 'selected' : ''); ?>>De-Active</option>
                                        </select>
                                        <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                    </div>
                                </div>
                            </div>

                        </div>

                        
                        <div class="card-footer d-flex justify-content-end">
                            <button type="submit" class="btn btn-primary">
                                <i class="fas fa-edit"></i> Update
                            </button>
                        </div>

                    </form>
                    

                </div>

            </div>
        </div>
    </div>
</section>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\laragon\www\bookFire\resources\views/backend/pages/catagory/edit.blade.php ENDPATH**/ ?>