<?php $__env->startSection('title'); ?>
<?php if(isset($category)): ?>
Edit Category
<?php else: ?>
Add Category
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('css'); ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Dropify/0.2.2/css/dropify.min.css"
    integrity="sha512-EZSUkJWTjzDlspOoPSpUFR0o0Xy7jdzW//6qhUkoZ9c4StFkVsp9fbbd0O06p9ELS3H486m4wmrCELjza4JEog=="
    crossorigin="anonymous" />
<style>
    .dropify-wrapper .dropify-message p {
        font-size: initial;
    }
</style>
<?php $__env->stopPush(); ?>

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

<!-- Content Header (Page header) -->
<section class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h1>
                    <?php if(isset($category)): ?>
                    Edit Category
                    <?php else: ?>
                    Add Category
                    <?php endif; ?>
                </h1>
            </div>
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="<?php echo e(routeHelper('dashboard')); ?>">Home</a></li>
                    <li class="breadcrumb-item active">
                        <?php if(isset($category)): ?>
                        Edit Category
                        <?php else: ?>
                        Add Category
                        <?php endif; ?>
                    </li>
                </ol>
            </div>
        </div>
    </div><!-- /.container-fluid -->
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-8 offset-md-2">
            <!-- Default box -->
            <div class="card">
                <div class="card-header">

                    <div class="row">
                        <div class="col-sm-6">
                            <h3 class="card-title">
                                Edit Category Details

                            </h3>
                        </div>
                        <div class="col-sm-6 text-right">
                            <?php if(isset($category)): ?>
                            <a href="<?php echo e(routeHelper('category/'.$category->id)); ?>" class="btn btn-info">
                                <i class="fas fa-eye"></i>
                                Show
                            </a>
                            <?php endif; ?>

                            <a href="<?php echo e(routeHelper('category')); ?>" class="btn btn-danger">

                                <i class="fas fa-long-arrow-alt-left"></i>
                                Back to List
                            </a>
                        </div>
                    </div>
                </div>
                <?php if(!empty(Session::get('massage2'))): ?>
                <span
                    style="margin-bottom: 20px;display: block;color: #1cc88a;text-align: center;background: white;padding: 5px;border-radius: 5px;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important;">
                    <?php echo e(Session::get('massage2')); ?></span>
                <?php endif; ?>

                <form action="<?php echo e(route('admin.edit.extra')); ?>" method="POST" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo e($extra->id); ?>" name="ddddd">

                    <?php echo csrf_field(); ?>
                    <div class="card-body">

                        <div class="form-group">
                            <label for="">Category name:</label>
                            <select name="main" id="mainCategory" class="category form-control" required>
                                <option value="">Select Category</option>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option <?php echo e($hascategories->id==$category->id ? 'selected':''); ?> value="<?php echo e($category->id); ?>">
                                    <?php echo e($category->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="nsubc">Select Sub Category:</label>
                            <select name="nsubc" id="nsubc" class="sub_category form-control">
                                <option value="<?php echo e($hsasub->id); ?>"><?php echo e($hsasub->name); ?></option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="mini">Select mini Category:</label>
                            <select name="mini" id="mini" class="sub_category form-control">
                                <option value="<?php echo e($hsaMini->id); ?>"><?php echo e($hsaMini->name); ?></option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="name">Name:</label>
                            <input type="text" name="name" id="name" placeholder="Write category name"
                                class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                value="<?php echo e($extra->name ?? old('name')); ?>" required autocomplete="off">
                            <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback"><?php echo e($message); ?></div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <label for="cover_photo">Cover Photo:</label> | <span class="text-xs text-muted">Recommended size 1:1 ratio</span>
                            <input type="file" name="cover_photo" id="cover_photo" accept="image/*"
                                class="form-control <?php $__errorArgs = ['cover_photo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                data-default-file="<?php if(isset($extra)): ?> /uploads/extra-category/<?php echo e($extra->cover_photo); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                            <?php $__errorArgs = ['cover_photo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback d-block"><?php echo e($message); ?></div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" name="status" id="status" <?php if(isset($extra)): ?> <?php echo e($extra->status ? 'checked':''); ?> <?php else: ?> checked <?php endif; ?>>
                                <label class="custom-control-label" for="status">Status</label>
                            </div>
                            <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback"><?php echo e($message); ?></div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <div class="custom-control custom-switch">
                                <input type="checkbox" class="custom-control-input" name="is_feature" id="is_feature"
                                    <?php if(isset($extra)): ?> <?php echo e($extra->is_feature ? 'checked':''); ?> <?php else: ?> checked <?php endif; ?>>
                                <label class="custom-control-label" for="is_feature">is_features</label>
                            </div>
                            <?php $__errorArgs = ['is_feature'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-feedback"><?php echo e($message); ?></div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                    </div>
                    <div class="card-footer">
                        <div class="form-group">
                            <button class="mt-1 btn btn-primary">
                                <?php if(isset($category)): ?>
                                <i class="fas fa-arrow-circle-up"></i>
                                Update
                                <?php else: ?>
                                <i class="fas fa-plus-circle"></i>
                                Submit
                                <?php endif; ?>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            <!-- /.card -->
        </div>
    </div>


</section>
<!-- /.content -->

<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?>
<script src="<?php echo e(asset('/assets/plugins/dropify/dropify.min.js')); ?>"></script>
<script src="/assets/dist/extra.js"></script>
<script>
    $(function () {
        $('#cover_photo').dropify();
    });
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.admin.e-commerce.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/apleusbj/shopping.apleefix.com/resources/views/admin/e-commerce/extra-category/update.blade.php ENDPATH**/ ?>