<?php if($customFields): ?>
    <h5 class="col-12 pb-4"><?php echo trans('lang.main_fields'); ?></h5>
<?php endif; ?>
<div class="d-flex flex-column col-sm-12 col-md-6">
    <!-- Name Field -->
    <div class="form-group align-items-baseline d-flex flex-column flex-md-row">
        <?php echo Form::label('name', trans("lang.category_name"), ['class' => 'col-md-3 control-label text-md-right mx-1']); ?>

        <div class="col-md-9">
            <?php echo Form::text('name', null,  ['class' => 'form-control','placeholder'=>  trans("lang.category_name_placeholder")]); ?>

            <div class="form-text text-muted">
                <?php echo e(trans("lang.category_name_help")); ?>

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

    <!-- Color Field -->
    <div class="form-group align-items-baseline d-flex flex-column flex-md-row">
        <?php echo Form::label('color', trans("lang.category_color"), ['class' => 'col-md-3 control-label text-md-right mx-1']); ?>

        <div class="col-md-9">
            <?php echo Form::text('color', null,  ['class' => 'form-control','placeholder'=>  trans("lang.category_color_placeholder")]); ?>

            <div class="form-text text-muted">
                <?php echo e(trans("lang.category_color_help")); ?>

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

    <!-- Description Field -->
    <div class="form-group align-items-baseline d-flex flex-column flex-md-row">
        <?php echo Form::label('description', trans("lang.category_description"), ['class' => 'col-md-3 control-label text-md-right mx-1']); ?>

        <div class="col-md-9">
            <?php echo Form::textarea('description', null, ['class' => 'form-control','placeholder'=>
             trans("lang.category_description_placeholder")  ]); ?>

            <div class="form-text text-muted"><?php echo e(trans("lang.category_description_help")); ?></div>
        </div>
    </div>
</div>
<div class="d-flex flex-column col-sm-12 col-md-6">
    <!-- Image Field -->
    <div class="form-group align-items-start d-flex flex-column flex-md-row">
        <?php echo Form::label('image', trans("lang.category_image"), ['class' => 'col-md-3 control-label text-md-right mx-1']); ?>

        <div class="col-md-9">
            <div style="width: 100%" class="dropzone image" id="image" data-field="image">
                <input type="hidden" name="image">
            </div>
            <a href="#loadMediaModal" data-dropzone="image" data-toggle="modal" data-target="#mediaModal" class="btn btn-outline-<?php echo e(setting('theme_color','primary')); ?> btn-sm float-right mt-1"><?php echo e(trans('lang.media_select')); ?></a>
            <div class="form-text text-muted w-50">
                <?php echo e(trans("lang.category_image_help")); ?>

            </div>
        </div>
    </div>
    <?php $__env->startPrepend('scripts'); ?>
        <script type="text/javascript">
            var var16110650672130312723ble = '';
            <?php if(isset($category) && $category->hasMedia('image')): ?>
                var16110650672130312723ble = {
                name: "<?php echo $category->getFirstMedia('image')->name; ?>",
                size: "<?php echo $category->getFirstMedia('image')->size; ?>",
                type: "<?php echo $category->getFirstMedia('image')->mime_type; ?>",
                collection_name: "<?php echo $category->getFirstMedia('image')->collection_name; ?>"
            };
            <?php endif; ?>
            var dz_var16110650672130312723ble = $(".dropzone.image").dropzone({
                url: "<?php echo url('uploads/store'); ?>",
                addRemoveLinks: true,
                maxFiles: 1,
                init: function () {
                    <?php if(isset($category) && $category->hasMedia('image')): ?>
                    dzInit(this, var16110650672130312723ble, '<?php echo url($category->getFirstMediaUrl('image','thumb')); ?>')
                    <?php endif; ?>
                },
                accept: function (file, done) {
                    dzAccept(file, done, this.element, "<?php echo config('medialibrary.icons_folder'); ?>");
                },
                sending: function (file, xhr, formData) {
                    dzSending(this, file, formData, '<?php echo csrf_token(); ?>');
                },
                maxfilesexceeded: function (file) {
                    dz_var16110650672130312723ble[0].mockFile = '';
                    dzMaxfile(this, file);
                },
                complete: function (file) {
                    dzComplete(this, file, var16110650672130312723ble, dz_var16110650672130312723ble[0].mockFile);
                    dz_var16110650672130312723ble[0].mockFile = file;
                },
                removedfile: function (file) {
                    dzRemoveFile(
                        file, var16110650672130312723ble, '<?php echo url("categories/remove-media"); ?>',
                        'image', '<?php echo isset($category) ? $category->id : 0; ?>', '<?php echo url("uplaods/clear"); ?>', '<?php echo csrf_token(); ?>'
                    );
                }
            });
            dz_var16110650672130312723ble[0].mockFile = var16110650672130312723ble;
            dropzoneFields['image'] = dz_var16110650672130312723ble;
        </script>
<?php $__env->stopPrepend(); ?>

<!-- Order Field -->
    <div class="form-group align-items-baseline d-flex flex-column flex-md-row">
        <?php echo Form::label('order', trans("lang.category_order"), ['class' => 'col-md-3 control-label text-md-right mx-1']); ?>

        <div class="col-md-9">
            <?php echo Form::number('order', null,  ['class' => 'form-control','step'=>'1','min'=>'0', 'placeholder'=>  trans("lang.category_order_placeholder")]); ?>

            <div class="form-text text-muted">
                <?php echo e(trans("lang.category_order_help")); ?>

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

    <!-- Parent Id Field -->
    <div class="form-group align-items-baseline d-flex flex-column flex-md-row">
        <?php echo Form::label('parent_id', trans("lang.category_parent_id"),['class' => 'col-md-3 control-label text-md-right mx-1']); ?>

        <div class="col-md-9">
            <?php echo Form::select('parent_id', $parentCategory, null, ['data-empty'=>trans("lang.category_parent_id_placeholder"), 'class' => 'select2 not-required form-control']); ?>

            <div class="form-text text-muted"><?php echo e(trans("lang.category_parent_id_help")); ?></div>
        </div>
    </div>

</div>
<?php if($customFields): ?>
    <div class="clearfix"></div>
    <div class="col-12 custom-field-container">
        <h5 class="col-12 pb-4"><?php echo trans('lang.custom_field_plural'); ?></h5>
        <?php echo $customFields; ?>

    </div>
<?php endif; ?>
<!-- Submit Field -->
<div class="form-group col-12 d-flex flex-column flex-md-row justify-content-md-end justify-content-sm-center border-top pt-4">
    <div class="d-flex flex-row justify-content-between align-items-center">
        <?php echo Form::label('featured', trans("lang.category_featured_help"),['class' => 'control-label my-0 mx-3'],false); ?> <?php echo Form::hidden('featured', 0, ['id'=>"hidden_featured"]); ?>

        <span class="icheck-<?php echo e(setting('theme_color')); ?>">
            <?php echo Form::checkbox('featured', 1, null); ?> <label for="featured"></label> </span>
    </div>
    <button type="submit" class="btn bg-<?php echo e(setting('theme_color')); ?> mx-md-3 my-lg-0 my-xl-0 my-md-0 my-2">
        <i class="fa fa-save"></i> <?php echo e(trans('lang.save')); ?> <?php echo e(trans('lang.category')); ?>

    </button>
    <a href="<?php echo route('categories.index'); ?>" class="btn btn-default"><i class="fa fa-undo"></i> <?php echo e(trans('lang.cancel')); ?></a>
</div>
<?php /**PATH /home/sabademoproject/burke.sabademoproject.com/home_services/resources/views/categories/fields.blade.php ENDPATH**/ ?>