@extends('layouts.app')

@section('content')

<div class="content-header">
  <div class="container-fluid">
    <div class="row mb-2">
      <div class="col-sm-6">
        <h1 class="m-0 text-dark">LIVETV Settings</h1>
      </div>
      <div class="col-sm-6">
        <ol class="breadcrumb float-sm-right">
          <li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
          <li class="breadcrumb-item active">LIVETV Settings</li>
        </ol>
      </div>
    </div>
  </div>
</div>

<div class="card">
  <div class="card-header">
    <h3 class="card-title">LIVETV Settings</h3>
  </div>

  <div class="card-body">

    <div class="modal-header">
      <h4 class="modal-title">LIVETV Settings</h4>

      @if($livetv->status == 1)
        <a href="{{ route('deactive.livetv',$livetv->id) }}" class="btn btn-danger float-right">Deactivate</a>
      @else
        <a href="{{ route('active.livetv',$livetv->id) }}" class="btn btn-success float-right">Activate</a>
      @endif

    </div>

    <div class="modal-body">

      <form action="{{ route('update.livetv',$livetv->id) }}" method="POST">
        @csrf

        <div class="form-group">
          <label>Embed Code</label>

          <textarea class="form-control" name="embed_code" style="height:300px;" required>{{ $livetv->embed_code }}</textarea>

          @if($livetv->status == 1)
            <small class="text-success">Now LiveTV is Active</small>
          @else
            <small class="text-danger">Now LiveTV is Deactive</small>
          @endif

        </div>

        <button type="submit" class="btn btn-success btn-block">Update</button>

      </form>

    </div>

  </div>
</div>

@endsection