<?php $__env->startSection('title','Admin | General Create'); ?>
<?php $__env->startSection('content'); ?>
<div class="loader"></div>
<div id="app">
    <div class="main-wrapper main-wrapper-1">
        <?php echo $__env->make('layouts.navbar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <div class="main-content">
            <section class="section">
                <div class="section-body">
                    <div class="row">
                        <div class="col-12 col-md-12 col-lg-12">
                            <div class="card">
                                <div class="card-header">
                                    <h4>
                                        <?php echo e(isset($market) ? 'Update General Market' : 'Create General Market'); ?>

                                </div>
                                <?php if(isset($market)): ?>
                                <form method="post" action="<?php echo e(route('markets.update', ['market' => $market->id])); ?>">
                                    <?php echo method_field('PUT'); ?>
                                    <?php else: ?>
                                    <form method="post" action="<?php echo e(route('markets.store')); ?>"> <?php echo csrf_field(); ?>
                                        <?php endif; ?>
                                        <?php echo csrf_field(); ?>
                                        <div class="card-body">
                                            <div class="row">
                                                <div class="form-group col-6">
                                                    <label>Name</label>
                                                    <div class="input-group">
                                                        <input type="text" name="name" class="form-control" value="<?php echo e(old('name', $market->name ?? '')); ?>">
                                                    </div>
                                                    <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                                <div class="form-group col-6">
                                                    <label>Api Key Name</label>
                                                    <div class="input-group">
                                                        <input type="text" name="api_key_name" class="form-control" value="<?php echo e(old('api_key_name', $market->api_key_name ?? '')); ?>">
                                                    </div>
                                                    <?php $__errorArgs = ['api_key_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="form-group col-6">
                                                    <label>Open Time</label>
                                                    <div class="input-group">
                                                        <input type="time" name="open_time" class="form-control" value="<?php echo e(old('open_time',  date('H:i', strtotime($market->open_time ?? '')))); ?>">
                                                    </div>
                                                    <?php $__errorArgs = ['open_time'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                                <div class="form-group col-6">
                                                    <label>Close Time</label>
                                                    <div class="input-group">
                                                        <input type="time" name="close_time" class="form-control" value="<?php echo e(old('close_time',  date('H:i', strtotime($market->close_time ?? '')))); ?>">
                                                    </div>
                                                    <?php $__errorArgs = ['close_time'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="form-group col-6">
                                                    <label>Open Result Time</label>
                                                    <div class="input-group">
                                                        <input type="time" name="open_result_time" class="form-control" value="<?php echo e(old('open_result_time',  date('H:i', strtotime($market->open_result_time ?? '')))); ?>">
                                                    </div>
                                                    <?php $__errorArgs = ['open_result_time'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                                <div class="form-group col-6">
                                                    <label>Close Result Time</label>
                                                    <div class="input-group">
                                                        <input type="time" name="close_result_time" class="form-control" value="<?php echo e(old('close_result_time', date('H:i', strtotime( $market->close_result_time ?? '')))); ?>">
                                                    </div>
                                                    <?php $__errorArgs = ['close_result_time'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="form-group col-6">
                                                    <label class="form-label">Disable Game </label>
                                                    <div class="selectgroup w-100">
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="disable_game" value="1" class="selectgroup-input-radio" <?php if(($market->disable_game ?? false) == 1 || (old('disable_game') ?? false) == 1): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">YES </span>
                                                        </label>
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="disable_game" value="0" class="selectgroup-input-radio" <?php if(($market->disable_game ?? true) == 0 || (old('disable_game') ?? true) == 0): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">NO</span>
                                                        </label>
                                                    </div>
                                                    <?php $__errorArgs = ['disable_game'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                                <div class="form-group col-6">
                                                    <label class="form-label">Saturday Open </label>
                                                    <div class="selectgroup w-100">
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="saturday_open" value="1" class="selectgroup-input-radio" <?php if(($market->saturday_open ?? false) == 1 || (old('saturday_open') ?? false) == 1): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Enable </span>
                                                        </label>
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="saturday_open" value="0" class="selectgroup-input-radio" <?php if(($market->saturday_open ?? true) == 0 || (old('saturday_open') ?? true) == 0): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Disable</span>
                                                        </label>
                                                    </div>
                                                    <?php $__errorArgs = ['saturday_open'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="form-group col-6">
                                                    <label class="form-label">Sunday Open </label>
                                                    <div class="selectgroup w-100">
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="sunday_open" value="1" class="selectgroup-input-radio" <?php if(($market->sunday_open ?? false) == 1 || (old('sunday_open') ?? false) == 1): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Enable </span>
                                                        </label>
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="sunday_open" value="0" class="selectgroup-input-radio" <?php if(($market->sunday_open ?? true) == 0 || (old('sunday_open') ?? true) == 0): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Disable</span>
                                                        </label>
                                                    </div>
                                                    <?php $__errorArgs = ['sunday_open'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                                <div class="form-group col-6">
                                                    <label class="form-label">Auto Result </label>
                                                    <div class="selectgroup w-100">
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="auto_result" value="1" class="selectgroup-input-radio" <?php if(($market->auto_result ?? false) == 1 || (old('auto_result') ?? false) == 1): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Enable </span>
                                                        </label>
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="auto_result" value="0" class="selectgroup-input-radio" <?php if(($market->auto_result ?? true) == 0 || (old('auto_result') ?? true) == 0): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Disable</span>
                                                        </label>
                                                    </div>
                                                    <?php $__errorArgs = ['auto_result'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="form-group col-6">
                                                    <label class="form-label">Previous Day Check </label>
                                                    <div class="selectgroup w-100">
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="previous_day_check" value="1" class="selectgroup-input-radio" <?php if(($market->previous_day_check ?? false) == 1 || (old('previous_day_check') ?? false) == 1): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Enable </span>
                                                        </label>
                                                        <label class="selectgroup-item">
                                                            <input type="radio" name="previous_day_check" value="0" class="selectgroup-input-radio" <?php if(($market->previous_day_check ?? true) == 0 || (old('previous_day_check') ?? true) == 0): ?> checked <?php endif; ?>>
                                                            <span class="selectgroup-button">Disable</span>
                                                        </label>
                                                    </div>
                                                    <?php $__errorArgs = ['previous_day_check'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                    <div class="alert alert-danger mt-2">
                                                        <?php echo e($message); ?>

                                                    </div>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <button type="submit" class="btn btn-outline-primary">
                                                    <?php echo e(isset($market) ? 'Update' : 'Submit'); ?>

                                                </button>
                                            </div>
                                        </div>
                                    </form>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/shyambabamatka/public_html/alpha786.com/resources/views/dashboard/markets/create.blade.php ENDPATH**/ ?>