<?php $__env->startSection('title'); ?>
Kompetensi Dasar <?php echo e($dataajar->mapel->nama); ?> - <?php echo e($dataajar->kelas->tingkatan); ?> <?php echo e($dataajar->kelas->jurusan); ?> <?php echo e($dataajar->kelas->suffix); ?>

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

<?php $__env->startPush('before-script'); ?>

<?php if(session('status')): ?>
<?php if (isset($component)) { $__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Sweetalertsession::class, ['tipe' => ''.e(session('tipe')).'','status' => ''.e(session('status')).'']); ?>
<?php $component->withName('sweetalertsession'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5)): ?>
<?php $component = $__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5; ?>
<?php unset($__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5); ?>
<?php endif; ?>
<?php endif; ?>
<?php $__env->stopPush(); ?>


<?php $__env->startSection('content'); ?>
<section class="section">
    <div class="section-header">
        <h1><?php echo $__env->yieldContent('title'); ?></h1>
        <div class="section-header-breadcrumb">
            <div class="breadcrumb-item active"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></div>
            <div class="breadcrumb-item"><a href="<?php echo e(route('silabus')); ?>">Silabus</a></div>
            <div class="breadcrumb-item"><a href="<?php echo e(route('dataajar.kompetensidasar',$dataajar->id)); ?>"><?php echo $__env->yieldContent('title'); ?></a></div>
            <div class="breadcrumb-item">Tambah</div>
        </div>
    </div>

    <div class="section-body">
        <div class="card">
            <div class="card-header">
                <h5>Tambah</h5>
            </div>
            <div class="card-body">

                <form action="<?php echo e(route('dataajar.kompetensidasar.store',$dataajar->id)); ?>" method="post" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>

                    <div class="row">
                        <div class="form-group col-md-6 col-6 mt-0 ml-5">
                            <label class="form-label">Tipe</label>
                            <div class="selectgroup w-100">
                            <label class="selectgroup-item">
                                <input type="radio" name="tipe" value="1" class="selectgroup-input tipekd" checked="" id="tipekd">
                                <span class="selectgroup-button">Pengetahuan</span>
                            </label>
                              <label class="selectgroup-item">
                                <input type="radio" name="tipe" value="2" class="selectgroup-input tipekd" id="tipekd">
                                <span class="selectgroup-button">Ketrampilan</span>
                              </label>

                            </div>
                          </div>
                          <?php $__env->startPush('before-script'); ?>
                          <script>
                    $(document).ready(function() {
                            let tipeisi=1;
                            // fungsi kirim data periksa
                            function kirimtipe(tipeisi = '') {
                            // console.log(datapertanyaan);
                                $.ajax({
                                    url: "<?php echo e(route('api.banksoal.kompetensidasargeneratekode',$dataajar->id)); ?>",
                                    method: 'GET',
                                    data: {
                                        "_token": "<?php echo e(csrf_token()); ?>",
                                        tipe:tipeisi,
                                    },
                                    dataType: 'json',
                                    success: function (data) {
                                        // console.log(data.output);
                                        $('#kodegenerate').val(data.output);
                                    }
                                })
                            }

                        let tipe_isi=1;
                        let tipe=$('input[name=tipe]:checked');
                                $('.tipekd').click(function () {
                                    tipe=$('input[name=tipe]:checked');
                                    //  alert(tipe.val());
                                        let isiprefix='<b>3.</b>';
                                    if(tipe.val()=='2'){
                                         isiprefix='<b>4.</b>';
                                        $('#kodeprefix').html(isiprefix)
                                    }else{
                                         isiprefix='<b>3.</b>';
                                        $('#kodeprefix').html(isiprefix)
                                    }
                                    kirimtipe(tipe.val());
                                });


                            });


                          </script>

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


                        <div class="form-group col-md-2 col-2 mt-0 ml-5">
                            <label class="form-label">Kode</label>
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text" id="kodeprefix">
                                        <b>3.</b>
                                    </div>
                                </div>
                                <input type="number" min="1" name="kode" id="kodegenerate"
                                    class="form-control <?php $__errorArgs = ['kode'];
$__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($generatekode); ?>" required>
                                <?php $__errorArgs = ['kode'];
$__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>
<?php $__env->startPush('after-style'); ?>
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
<script src="<?php echo e(asset("assets/")); ?>/stisla/summernote-bs4.js"></script>
<?php $__env->stopPush(); ?>
                        <div class="form-group col-md-6 col-12 ml-5">
                        <label for="nama">Judul</label> :
                        <textarea class="form-control " style="min-width: 100%;height:100%;" name="nama"
                            id="nama"  ></textarea>
                        </div>
                        <?php $__env->startPush('after-script'); ?>
                        <script>

                            $(document).ready(function() {
                                // $('#pertanyaan').summernote({focus: true});
                            });
                        </script>

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



                    </div>
                    <div class="row" id="formjawaban">
                    </div>

                    <div class="card-footer text-right mr-5">
                        <button class="btn btn-primary">Simpan</button>
                    </div>
                </form>


            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.default', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Xampp 8.2\htdocs\sim\resources\views/pages/admin/kompetensidasar/create.blade.php ENDPATH**/ ?>