<?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('Sub Forum Create')); ?> <?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' => ['title' => ''.e(isset($subForum) ? 'Edit' : 'Create').' Sub Forum','pageTo' => 'Sub Forum']] + (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(['title' => ''.e(isset($subForum) ? 'Edit' : 'Create').' Sub Forum','page-to' => 'Sub Forum']); ?>
<?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; ?>
    <form method="post" class="form"
        action="<?php echo e(isset($subForum) ? route('sub-forum.update', $subForum->id) : route('sub-forum.store')); ?>">
        <?php echo csrf_field(); ?>
        <?php if(isset($subForum)): ?>
            <?php echo method_field('PUT'); ?>
            <input type="hidden" name="id" value="<?php echo e($subForum->id); ?>">
        <?php endif; ?>
        <div class="card">
            <div class="mt-6">
                <label for="forumTitle" class="form-label"><?php echo e(translate('Title')); ?> <span
                        class="text-danger">*</span></label>
                <input type="text" id="forumTitle" placeholder="<?php echo e(translate('Title')); ?>" name="name"
                    value="<?php echo e(isset($subForum) ? $subForum->name : ''); ?>" class="form-input">
                <span class="text-danger error-text name_err"></span>
            </div>
            <div class="mt-6">
                <label class="form-label"><?php echo e(translate('Select Forum')); ?> <span class="text-danger">*</span></label>
                <select class="singleSelect" name="forum_id">
                    <option selected disabled> <?php echo e(translate('Select Forum')); ?> </option>
                    <?php $__currentLoopData = forums(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $forum): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($forum->id); ?>"
                            <?php echo e(isset($subForum) && $subForum->forum_id == $forum->id ? 'selected' : ''); ?>>
                            <?php echo e($forum->title); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <span class="text-danger error-text forum_id_err"></span>
            </div>
            <div class="mt-6">
                <label for="forumTitle" class="form-label"> <?php echo e(translate('Description')); ?> <span
                        class="text-danger">*</span></label>
                <textarea name="description" class="summernote"><?php echo clean($subForum->description ?? ''); ?></textarea>
                <span class="text-danger error-text description_err"></span>
            </div>
            <div class="mt-6">
                <label class="form-label"><?php echo e(translate('Icon')); ?></label>
                <label for="imgage"
                    class="dropzone-wrappe file-container ac-bg text-xs leading-none font-semibold mb-3 cursor-pointer size-[200px] flex flex-col items-center justify-center gap-2.5 border border-dashed border-gray-900 rounded-10 dk-theme-card-square">
                    <input type="file" hidden name="sub_forum_img" id="imgage"
                        class="dropzone dropzone-image img-src peer/file">
                    <span class="flex-center flex-col peer-[.uploaded]/file:hidden">
                        <img src="<?php echo e(asset('lms/')); ?>/assets/images/icons/upload-file.svg" alt="file-icon"
                            class="size-8 lg:size-auto">
                        <div class="text-gray-500 dark:text-dark-text mt-2"> <?php echo e(translate('Choose file')); ?> </div>
                    </span>
                    <span class="text-danger error-text icon_err"></span>
                </label>
                <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($subForum) &&
                                    fileExists($folder = 'lms/forums/icons', $fileName = $subForum->icon) == true &&
                                    $subForum->icon != ''): ?>
                                <div class="img-thumb-wrapper"> <button class="remove">
                                        <i class="ri-close-line text-inherit text-[13px]"></i> </button>
                                    <img class="img-thumb" width="100"
                                        src="<?php echo e(asset('storage/lms/forums/icons/' . $subForum->icon)); ?>" />
                                </div>
                            <?php endif; ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="card flex justify-end">
            <button type="submit" class="btn b-solid btn-primary-solid px-5 cursor-pointer dk-theme-card-square">
                <?php echo e(translate('Submit')); ?>

            </button>
        </div>
    </form>
 <?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\forum\sub-forum\create.blade.php ENDPATH**/ ?>