<?php echo $__env->make('admin.layouts.alert-modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> 
<form method="post" action="<?php echo e(request()->url()); ?>" id="input_form">
	<?php echo csrf_field(); ?>
    <div class="row">
        <div class="form-group col-lg-6">
            <label>Pembayaran <text class="text-danger">*</text></label>
            <select class="form-control" name="payment" id="payment" data-toggle="select2">
                <option value="" selected>Pilih...</option>
                <?php $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($item); ?>" <?php echo e(old('payment') ? (old('payment') == $item ? 'selected' : '') : ($target->payment == $item ? 'selected' : '')); ?>><?php echo e($item); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            <small id="payment"></small>
        </div>
        <div class="form-group col-lg-6">
            <label>Tipe <text class="text-danger">*</text></label>
            <select class="form-control" name="type" id="type" data-toggle="select2">
                <option value="" selected>Pilih...</option>
                <?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($item); ?>" <?php echo e(old('type') ? (old('type') == $item ? 'selected' : '') : ($target->type == $item ? 'selected' : '')); ?>><?php echo e($item); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            <small id="type"></small>
        </div>
    </div>
    <div class="form-group">
        <label>Nama <text class="text-danger">*</text></label>
        <input type="text" class="form-control" name="name" id="name" value="<?php echo e(old('name') ?? $target->name); ?>">
        <small id="name"></small>
    </div>
    <div class="row">
        <div class="form-group col-lg-6">
            <label>Rate <text class="text-danger">*</text></label>
            <input type="number" class="form-control" step="any" min="0" id="rate" name="rate" value="<?php echo e(old('rate') ?? $target->rate); ?>">
            <small id="rate"></small>
        </div>
        <div class="form-group col-lg-6">
            <label>Min. <text class="text-danger">*</text></label>
            <input type="text" class="form-control autonumeric-currency" name="min" id="min" value="<?php echo e(old('min') ?? $target->min); ?>">
            <small id="min"></small>
        </div>
    </div>
    <div class="form-group">
        <label>Catatan <text class="text-danger">*</text></label>
        <textarea class="form-control custom-text-editor" name="note" id="note" rows="5"><?php echo e(old('note') ?? $target->note); ?></textarea>
        <small id="note"></small>
    </div>
    <div class="custom-control custom-switch mb-3">
        <input id="is_midtrans" name="is_midtrans" type="checkbox" class="custom-control-input" <?php if($target->id == true AND $target->is_midtrans == '1'): ?> checked <?php endif; ?>>
        <label class="custom-control-label" for="is_midtrans">Midtrans Payment</label>
        <small id="is_midtrans"></small>
    </div>
    <div class="custom-control custom-switch mb-3">
        <input id="is_tripay" name="is_tripay" type="checkbox" class="custom-control-input" <?php if($target->id == true AND $target->is_tripay == '1'): ?> checked <?php endif; ?>>
        <label class="custom-control-label" for="is_tripay">Tripay Payment</label>
        <small id="is_tripay"></small>
    </div>
    <div class="form-group <?php echo e(($target->id == true AND $target->is_tripay == '1') ? '' : 'hidden'); ?>" id="tripay">
        <label>Kode Pembayaran</label>
        <input type="text" name="tripay_payment_code" id="tripay_payment_code" class="form-control" value="<?php echo e(old('tripay_payment_code') ?? $target->tripay_payment_code); ?>"/>
        <small id="tripay_payment_code"></small>
    </div>
    <hr />
    <div class="button-items d-grid gap-2 hidden" id="process-button">
        <button type="button" class="btn btn-primary btn-block waves-effect waves-light mt-0" disabled>Mohon Tunggu...</button>
    </div>
    <div class="row" id="main-button">
        <div class="col-6">
            <div class="button-items d-grid gap-2">
                <button type="reset" class="btn btn-secondary btn-block waves-effect waves-light mt-0"><i class="mdi mdi-refresh"></i> Reset</button>
            </div>
        </div>
        <div class="col-6">
            <div class="button-items d-grid gap-2">
                <button type="submit" class="btn btn-custom btn-block waves-effect waves-light mt-0"><i class="mdi mdi-send-outline"></i> Submit</button>
            </div>
        </div>
    </div>
</form>
<script src="<?php echo e(asset('assets/js/modal-form.js')); ?>"></script>
<script src="<?php echo e(asset('assets/js/app.js')); ?>"></script>
<script>
    $('input[name="is_tripay"]').on('change', (event) => {
        if($(event.currentTarget).is(':checked')) {
            $('#tripay').removeClass('hidden');
        } else {
            $('#tripay').addClass('hidden');
        }
    });
    $('.custom-text-editor').summernote({
        height: 230
    });
</script><?php /**PATH /home/glor5228/public_html/resources/views/admin/deposit/method/form.blade.php ENDPATH**/ ?>