<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css" rel="stylesheet">
<?php $__env->startSection('content'); ?>

<div class="content-header row">
    <div class="content-header-left col-md-6 col-12 mb-2 breadcrumb-new">
        <h3 class="content-header-title mb-0 d-inline-block">اضافة منتج</h3>
        <div class="row breadcrumbs-top d-inline-block">
            <div class="breadcrumb-wrapper col-12">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="<?php echo e(route('products')); ?>">قائمة المنتجات</a></li>
                </ol>
            </div>
        </div>
    </div>
</div>
<div class="content-body">
    <!-- Striped row layout section start -->
    <section id="striped-row-form-layouts">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title" id="horz-layout-icons">اضافة منتج</h4>
                        <a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
                        <div class="heading-elements">
                            <ul class="list-inline mb-0">
                                <li><a data-action="collapse"><i class="ft-minus"></i></a></li>
                                <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                                <li><a data-action="expand"><i class="ft-maximize"></i></a></li>
                                <li><a data-action="close"><i class="ft-x"></i></a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="card-content collpase show">
                        <div class="card-body">
                            <form class="form form-horizontal striped-rows form-bordered" enctype="multipart/form-data" method="post" action="<?php echo e(route('products.store')); ?>">
                                <?php echo csrf_field(); ?>
                                <div class="form-body">
                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="ar_name">الاسم بالعربي</label>
                                        <div class="col-md-9">
                                            <div class="position-relative has-icon-left">
                                                <input type="text" required class="form-control" placeholder="الاسم بالعربي" name="ar_name" value="<?php echo e(old('ar_name')); ?>">
                                                <div class="form-control-position">
                                                    <i class="la la-tag"></i>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="en_name">الاسم بالانجليزي</label>
                                        <div class="col-md-9">
                                            <div class="position-relative has-icon-left">
                                                <input type="text" required class="form-control" placeholder="الاسم بالانجليزي" name="en_name" value="<?php echo e(old('en_name')); ?>">
                                                <div class="form-control-position">
                                                    <i class="la la-tag"></i>
                                                </div>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="ar_summary">الملخص بالعربي</label>
                                        <div class="col-md-9">
                                            <div class="position-relative has-icon-left">
                                                <textarea id="ar_summary" class="form-control" rows="4"  name="ar_summary"><?php echo e(old('ar_summary')); ?></textarea>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="en_summary">الملخص بالانجليزي</label>
                                        <div class="col-md-9">
                                            <div class="position-relative has-icon-left">
                                                <textarea id="en_summary" class="form-control" rows="4"  name="en_summary"><?php echo e(old('en_summary')); ?></textarea>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="ar_description">الوصف بالعربي</label>
                                        <div class="col-md-9">
                                            <textarea id="summernote-ar" name="ar_description" required><?php echo e(old('ar_description')); ?></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="en_description">الوصف بالانجليزي</label>
                                        <div class="col-md-9">
                                            <textarea id="summernote-en" name="en_description" required><?php echo e(old('en_description')); ?></textarea>
                                        </div>
                                    </div>



                                    <div class="form-group row">
                                        <label class="col-md-3 label-control" for="photo">صورة</label>
                                        <div class="col-md-9">
                                            <div class="position-relative has-icon-left">
                                                <input type="file" class="form-control" name="photo">
                                                <div class="form-control-position">
                                                    <i class="la la-file-image-o"></i>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-actions right">
                                    <button type="submit" class="btn btn-primary">
                                        <i class="la la-check-square-o"></i> حفظ
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>

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


<?php $__env->startSection('scripts'); ?>
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js"></script>

  <script type="text/javascript">
    $(document).ready(function() {
        $('#summernote-ar').summernote({
            placeholder: 'الوصف بالعربي',
            tabsize: 2,
            height: 300, // زيادة الارتفاع هنا
            toolbar: [
                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['font', ['strikethrough', 'superscript', 'subscript', 'fontname', 'color', 'fontsize', 'insertTable']],
                ['para', ['ul', 'ol', 'paragraph']],
                ['insert', ['link', 'picture', 'video']],
                ['view', ['codeview', 'help']]
            ],
            callbacks: {
                onImageUpload: function(files) {
                    for (let i = 0; i < files.length; i++) {
                        let reader = new FileReader();
                        reader.onload = (e) => {
                            $('#summernote-ar').summernote('insertImage', e.target.result);
                        };
                        reader.readAsDataURL(files[i]);
                    }
                }
            }
        });

        $('#summernote-en').summernote({
            placeholder: 'الوصف بالإنجليزي',
            tabsize: 2,
            height: 300, // زيادة الارتفاع هنا
            toolbar: [
                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['font', ['strikethrough', 'superscript', 'subscript', 'fontname', 'color', 'fontsize', 'insertTable']],
                ['para', ['ul', 'ol', 'paragraph']],
                ['insert', ['link', 'picture', 'video']],
                ['view', ['codeview', 'help']]
            ],
            callbacks: {
                onImageUpload: function(files) {
                    for (let i = 0; i < files.length; i++) {
                        let reader = new FileReader();
                        reader.onload = (e) => {
                            $('#summernote-en').summernote('insertImage', e.target.result);
                        };
                        reader.readAsDataURL(files[i]);
                    }
                }
            }
        });
    });
</script>

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


<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\icsc.industry.gov.iq\resources\views/admin/products/create.blade.php ENDPATH**/ ?>