@extends('backend.layouts.app')
@section('content')
  <div class="content-wrapper">
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>Advertisement Settings</h1>
          </div>
        </div>
      </div>
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-12">
            <div class="card">
              <form action="{{ route('admin.settings.advertisement.update') }}" method="POST">
                @csrf
                <div class="card-body">
                  <div class="row">
                    <!-- Admob Ads -->
                    <div class="col-md-12">
                      <label class="card-title">Admob Ads</label>              
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <h6>Inter Ad Unit</h6>
                        <input type="text" class="form-control" name="admob_inter" value="{{ old('admob_inter', $advertisement->admob_inter ?? '') }}" placeholder="Inter Ad Unit">
                      </div>
                      <div class="form-group">
                        <h6>Banner Ad Unit</h6>
                        <input type="text" class="form-control" name="admob_banner" value="{{ old('admob_banner', $advertisement->admob_banner ?? '') }}" placeholder="Banner Ad Unit">
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <h6>Native Ad Unit</h6>
                        <input type="text" class="form-control" name="admob_native" value="{{ old('admob_native', $advertisement->admob_native ?? '') }}" placeholder="Native Ad Unit">
                      </div>
                      <div class="form-group">
                        <h6>Reward Ad Unit</h6>
                        <input type="text" class="form-control" name="admob_reward" value="{{ old('admob_reward', $advertisement->admob_reward ?? '') }}" placeholder="Reward Ad Unit">
                      </div>
                    </div>

                    <!-- Facebook Ads -->
                    <div class="col-md-12">
                      <label class="card-title">Facebook Ads</label>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <h6>Inter Ad Unit</h6>
                        <input type="text" class="form-control" name="facebook_inter" value="{{ old('facebook_inter', $advertisement->facebook_inter ?? '') }}" placeholder="Inter Ad Unit">
                      </div>
                      <div class="form-group">
                        <h6>Banner Ad Unit</h6>
                        <input type="text" class="form-control" name="facebook_banner" value="{{ old('facebook_banner', $advertisement->facebook_banner ?? '') }}" placeholder="Banner Ad Unit">
                      </div>
                    </div>
                    <div class="col-md-6">
                      <div class="form-group">
                        <h6>Native Ad Unit</h6>
                        <input type="text" class="form-control" name="facebook_native" value="{{ old('facebook_native', $advertisement->facebook_native ?? '') }}" placeholder="Native Ad Unit">
                      </div>
                      <div class="form-group">
                        <h6>Reward Ad Unit</h6>
                        <input type="text" class="form-control" name="facebook_reward" value="{{ old('facebook_reward', $advertisement->facebook_reward ?? '') }}" placeholder="Reward Ad Unit">
                      </div>
                    </div>

                    <!-- Unity Ads -->
                    <div class="col-md-12">
                      <label class="card-title">Unity Ads</label>
                    </div>
                    <div class="col-md-12">
                      <div class="form-group">
                        <h6 style="color=red;">App Id / Game Id</h6>
                        <input type="text" class="form-control" name="unity_appId_gameId" value="{{ old('unity_appId_gameId', $advertisement->unity_appId_gameId ?? '') }}" placeholder="Enter your AppId/GameId">
                      </div>
                    </div>

                    <!-- ironsource Ads start -->
                    <div class="col-md-12">
                      <label class="card-title">Iron Source Ads</label>
                    </div>
                    <div class="col-md-12">
                      <div class="form-group">
                        <h6>App Key</h6>
                        <input type="text" class="form-control" name="iron_appKey" value="{{ old('iron_appKey', $advertisement->iron_appKey ?? '') }}" placeholder="Enter Your App Key">
                      </div>
                    </div>

                    <!-- AppNext Ads start -->
                    <div class="col-md-12">
                      <label class="card-title">App Next Ads:</label>
                    </div>
                    <div class="col-md-12">
                      <div class="form-group">
                        <h6>Placement Id</h6>
                        <input type="text" class="form-control" name="appnext_placementId" value="{{ old('appnext_placementId', $advertisement->appnext_placementId ?? '') }}" placeholder="Enter Your Placement ID">
                      </div>
                    </div>

                    <!-- Startup Ads  -->
                    <div class="col-md-12">
                      <label class="card-title">Startapp Ads:</label>
                    </div>
                    <div class="col-md-12">
                      <div class="form-group">
                        <h6>App Id</h6>
                        <input type="text" class="form-control" name="startapp_appId" value="{{ old('startapp_appId', $advertisement->startapp_appId ?? '') }}" placeholder="Enter Your App Id">
                      </div>
                    </div>

                    <div class="col-md-12">
                      <label class="card-title">Interstitial Interval</label>
                      <div class="form-group">
                        <input type="text" class="form-control" name="industrial_interval" value="{{ old('industrial_interval', $advertisement->industrial_interval ?? '') }}" placeholder="Industrial Interval">
                      </div>
                    </div>

                    <div class="col-md-12">
                      <label class="card-title">Native Ads</label>
                      <div class="form-group">
                        <input type="text" class="form-control" name="native_ads" value="{{ old('native_ads', $advertisement->native_ads ?? '') }}" placeholder="Native Ads">
                      </div>
                    </div>

                    <div class="col-md-12">
                      <label class="card-title" for="ads_type">Ads Type</label>
                    </div>
                    <div class="col-md-12 form-group">                
                      <select name="ads_type" id="ads_type" class="form-control">
                        <option disabled selected value="0">Select an Option</option>
                        <option value="0" @if(isset($advertisement) && $advertisement->ads_type == '0') selected @endif>Admob</option>
                        <option value="1" @if(isset($advertisement) && $advertisement->ads_type == '1') selected @endif>Facebook</option>
                        <option value="2" @if(isset($advertisement) && $advertisement->ads_type == '2') selected @endif>Startapp</option>
                        <option value="4" @if(isset($advertisement) && $advertisement->ads_type == '4') selected @endif>IronSource</option>
                        <option value="5" @if(isset($advertisement) && $advertisement->ads_type == '5') selected @endif>AppNext</option>
                        <option value="6" @if(isset($advertisement) && $advertisement->ads_type == '6') selected @endif>Unity</option>
                        <option value="3" @if(isset($advertisement) && $advertisement->ads_type == '3') selected @endif>Show Ads on Mix</option>
                      </select>
                    </div>

                  </div>
                </div>
         
              </form>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
@endsection

