<?php
    $locale = request()->locale ?? app()->getLocale();
    $translations = [];
    $bundle = $bundle ?? null;
    if ($bundle && $locale) {
        $translations = parse_translation($bundle, $locale);
    }
?>

<?php if (isset($component)) { $__componentOriginald7f77a02f879fd4954ea3c39c4e952cb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb = $attributes; } ?>
<?php $component = Modules\LMS\View\Components\Dashboard\Layout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Modules\LMS\View\Components\Dashboard\Layout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title', null, []); ?> <?php echo e(translate('View Bundle')); ?> <?php $__env->endSlot(); ?>
    <!-- BREADCRUMB -->
    <?php if (isset($component)) { $__componentOriginalcf27f2c2c873893339708d5fdeeb6984 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalcf27f2c2c873893339708d5fdeeb6984 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => '7ee9c4f86007ba41bc79bbfab1cd8a68::admin.breadcrumb','data' => ['backUrl' => ''.e(route('bundle.index')).'','title' => ''.e(translate('View')).' '.e(translate('Bundle')).'','pageTo' => 'Bundle']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('portal::admin.breadcrumb'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['back-url' => ''.e(route('bundle.index')).'','title' => ''.e(translate('View')).' '.e(translate('Bundle')).'','page-to' => 'Bundle']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalcf27f2c2c873893339708d5fdeeb6984)): ?>
<?php $attributes = $__attributesOriginalcf27f2c2c873893339708d5fdeeb6984; ?>
<?php unset($__attributesOriginalcf27f2c2c873893339708d5fdeeb6984); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalcf27f2c2c873893339708d5fdeeb6984)): ?>
<?php $component = $__componentOriginalcf27f2c2c873893339708d5fdeeb6984; ?>
<?php unset($__componentOriginalcf27f2c2c873893339708d5fdeeb6984); ?>
<?php endif; ?>
    <div class="grid grid-cols-12 gap-x-4">
        <div class="col-span-full lg:col-span-6 card">
            <h6 class="leading-none text-xl font-semibold text-heading">
                <?php echo e(translate('View')); ?>

            </h6>
            <div class="mt-7">
                <div class="mt-6">
                    <label for="bundle-title" class="form-label">
                        <?php echo e(translate('Title')); ?>

                        <span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span>
                    </label>
                    <input type="text" id="bundle-title" placeholder="<?php echo e(translate('Title')); ?>" class="form-input"
                        name="title" value="<?php echo e($translations['title'] ?? $bundle->title ?? ''); ?>">
                    <span class="text-danger error-text title_err"></span>
                </div>
                <div class="mt-6">
                    <label for="bundle-price" class="form-label">
                        <?php echo e(translate('Price')); ?>($)
                        <span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span>
                    </label>
                    <input type="number" id="bundle-price" placeholder="<?php echo e(translate('Bundle Price')); ?>"
                        name="price" class="form-input" value="<?php echo e($bundle->price ?? ''); ?>">
                    <span class="text-danger error-text title_err"></span>
                </div>
                <div class="mt-6">
                    <label for="coupon-type" class="form-label">
                        <?php echo e(translate('Select Course')); ?>

                        <span class="text-danger" title="<?php echo e(translate('This field is required')); ?>"><b>*</b></span>
                    </label>
                    <select class="multipleSelect form-input" multiple="multiple" name="courseId[]">
                        <?php $__currentLoopData = get_all_course(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $course): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php $courseTranslations = parse_translation($course, $locale); ?>
                            <option value="<?php echo e($course->id); ?>"
                                <?php if(isset($bundle) && $bundle?->courses?->count() > 0): ?> <?php $__currentLoopData = $bundle?->courses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $bcourse): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                           <?php echo e($bcourse->id == $course->id ? 'selected' : ''); ?>

                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?>>
                                <?php echo e($courseTranslations['title'] ?? $course->title); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                    <span class="text-danger error-text courseId_err"></span>
                </div>
            </div>
        </div>
        <div class="col-span-full lg:col-span-6 card">
            <h6 class="leading-none text-xl font-semibold text-heading"><?php echo e(translate('Media')); ?></h6>
            <div class="mt-7">
                <p class="text-xs text-gray-500 dark:text-dark-text leading-none font-semibold mb-3">
                    <?php echo e(translate('Thumbnail')); ?>(<?php echo e(translate('300')); ?>x<?php echo e(translate('300')); ?>)</p>
                <div class="preview-zone dropzone-preview">
                    <div class="box box-solid">
                        <div class="box-body flex items-center gap-2 flex-wrap">
                            <?php if(isset($bundle) &&
                                    fileExists($folder = 'lms/courses/bundles', $fileName = $bundle?->thumbnail) == true &&
                                    $bundle?->thumbnail !== ''): ?>
                                <div class="img-thumb-wrapper">
                                    <img class="img-thumb" width="100"
                                        src="<?php echo e(asset('storage/lms/courses/bundles/' . $bundle->thumbnail)); ?>" />
                                </div>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="card col-span-full">
            <label class="form-label"><?php echo e(translate('Description')); ?></label>
            <div>
                <?php echo clean( $translations['details'] ?? $bundle->details ?? ''); ?>

            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb)): ?>
<?php $attributes = $__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb; ?>
<?php unset($__attributesOriginald7f77a02f879fd4954ea3c39c4e952cb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald7f77a02f879fd4954ea3c39c4e952cb)): ?>
<?php $component = $__componentOriginald7f77a02f879fd4954ea3c39c4e952cb; ?>
<?php unset($__componentOriginald7f77a02f879fd4954ea3c39c4e952cb); ?>
<?php endif; ?>
<?php /**PATH D:\www\edulab\Modules\LMS\resources\views\portals\admin\course\bundle\view.blade.php ENDPATH**/ ?>