@extends('layouts.app')
@section('content')
<!-- BEGIN: Content-->
<div class="app-content content ">
    <div class="content-overlay"></div>
    <div class="header-navbar-shadow"></div>
    <div class="content-wrapper container-xxl p-0">
        <div class="content-header row">
            <div class="content-header-left col-md-9 col-12 mb-2">
                <div class="row breadcrumbs-top">
                    <div class="col-12">
                        <h2 class="content-header-title float-start mb-0">{{__('lang.admin_menu_settings')}}</h2>
                        <div class="breadcrumb-wrapper">
                            <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="{!! route('dashboard')!!}">{{__('lang.admin_menu_dashboard')}}</a>
                                </li>
                                <li class="breadcrumb-item active">{{__('lang.admin_menu_payment_gateway')}}
                                </li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="content-body">
            <section id="basic-switches">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="card">
                            <div class="card-header">
                                <h4 class="card-title">{{__('lang.admin_enable_payment_gateway')}}</h4>
                            </div>
                            <div class="card-body">
                                {!! Form::model(null, ['method' => 'PATCH','enctype'=>'multipart/form-data', 'url' => ['admin/settings/update']]) !!}
                                    <input type="hidden" name="page_name" value="payment">
                                    @foreach ($data as $row)
                                        @if($row->key=='enable_razorpay')
                                            <div class="demo-inline-spacing">
                                                <div class="form-check form-switch">
                                                    <input type="checkbox" class="form-check-input" name="enable_razorpay" id="customSwitch4" value="1" <?php if($row->value=='1'){?>checked<?php } ?>/>
                                                    <label class="form-check-label" for="customSwitch4">{{__('lang.admin_payment_gateway_razorpay')}}</label>
                                                </div>
                                            </div>
                                        @endif
                                        @if($row->key=='razorpay_key')
                                            <div class="col-md-6">
                                                <div class="mb-1">
                                                    <label class="form-label" for="razorpay_key">Razorpay Key</label>
                                                    <input type="text" class="form-control" placeholder="Razorpay Key" name="razorpay_key" id="razorpay_key" value="{{$row->value}}" />
                                                </div>
                                            </div>
                                        @endif
                                        @if($row->key=='razorpay_secret')
                                            <div class="col-md-6">
                                                <div class="mb-1">
                                                    <label class="form-label" for="razorpay_secret">Razorpay Secret</label>
                                                    <input type="text" class="form-control" placeholder="Razorpay Secret" name="razorpay_secret" id="razorpay_secret" value="{{$row->value}}" />
                                                </div>
                                            </div>
                                        @endif
                                        @if($row->key=='enable_oppwa')
                                            <div class="demo-inline-spacing">
                                                <div class="form-check form-switch">
                                                    <input type="checkbox" class="form-check-input" name="enable_oppwa" id="customSwitch1" value="1" <?php if($row->value=='1'){?>checked<?php } ?>/>
                                                    <label class="form-check-label" for="customSwitch1">Oppwa Payment Gateway</label>
                                                </div>
                                            </div>
                                        @endif
                                        @if($row->key=='enable_cod')
                                            <div class="demo-inline-spacing">
                                                <div class="form-check form-switch">
                                                    <input type="checkbox" class="form-check-input" name="enable_cod" id="customSwitch2" value="1" <?php if($row->value=='1'){?>checked<?php } ?>/>
                                                    <label class="form-check-label" for="customSwitch2">{{__('lang.admin_payment_gateway_cod')}}</label>
                                                </div>
                                            </div>
                                        @endif
                                        @if($row->key=='enable_wallet')
                                            <div class="demo-inline-spacing">
                                                <div class="form-check form-switch">
                                                    <input type="checkbox" class="form-check-input" name="enable_wallet" id="customSwitch3" value="1" <?php if($row->value=='1'){?>checked<?php } ?>/>
                                                    <label class="form-check-label" for="customSwitch3">{{__('lang.admin_payment_gateway_wallet')}}</label>
                                                </div>
                                            </div>
                                        @endif
                                    @endforeach
                                    <div class="col-12 d-flex flex-sm-row flex-column mt-2">
                                        <button type="submit" class="btn btn-primary mb-1 mb-sm-0 me-0 me-sm-1">{{__('lang.admin_button_save_changes')}}</button>
                                    </div>
                                {!! Form::close() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>
@endsection