<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">

    {!! SEO::generate() !!}
    {!! get_setting('script_header') !!}
    <style>
        html{
            font-size: 14px;
        }
        .footer {
            background-color: #f5f5f5;
        }
    </style>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <a class="navbar-brand" href="{{ mopie_route('home') }}">
            <img width="30" src="{{ asset_theme(get_setting('logo')) }}">
        </a>
        <button class="navbar-toggler" data-target="#my-nav" data-toggle="collapse" aria-controls="my-nav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div id="my-nav" class="collapse navbar-collapse">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="dropdown04" data-toggle="dropdown"
                        aria-haspopup="true" aria-expanded="false">{{ __('menu.movies') }}</a>
                    <div class="dropdown-menu mop" aria-labelledby="dropdown04">
                        <div class="row">
                            <div class="col-12">
                                <a class="dropdown-item" href="{{ mopie_route('movie.popular') }}" title="{{ __('menu.popular') }}">{{ __('menu.popular') }}</a>
                                <a class="dropdown-item" href="{{ mopie_route('movie.now.playing') }}" title="{{ __('menu.now_playing') }}">{{ __('menu.now_playing') }}</a>
                                <a class="dropdown-item" href="{{ mopie_route('movie.top.rated') }}" title="{{ __('menu.top_rated') }}">{{ __('menu.top_rated') }}</a>
                                <a class="dropdown-item" href="{{ mopie_route('movie.upcoming') }}" title="{{ __('menu.upcoming') }}">{{ __('menu.upcoming') }}</a>
                            </div>
                        </div>
                    </div>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="dropdown04" data-toggle="dropdown"
                        aria-haspopup="true" aria-expanded="false">{{ __('menu.tv_shows') }}</a>
                    <div class="dropdown-menu mop" aria-labelledby="dropdown04">
                        <div class="row">
                            <div class="col-12">
                                <a class="dropdown-item" href="{{ mopie_route('tv.popular') }}" title="{{ __('menu.popular') }}">{{ __('menu.popular') }}</a>
                                <a class="dropdown-item" href="{{ mopie_route('tv.top.rated') }}" title="{{ __('menu.top_rated') }}">{{ __('menu.top_rated') }}</a>
                                <a class="dropdown-item" href="{{ mopie_route('tv.on.the.air') }}" title="{{ __('menu.on_tv') }}">{{ __('menu.on_tv') }}</a>
                                <a class="dropdown-item" href="{{ mopie_route('tv.airing.to.day') }}" title="{{ __('menu.airing_today') }}">{{ __('menu.airing_today') }}</a>
                            </div>
                        </div>
                    </div>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="dropdown04" data-toggle="dropdown"
                        aria-haspopup="true" aria-expanded="false">{{ __('menu.genres') }}</a>
                    <div class="dropdown-menu" aria-labelledby="dropdown04">
                        @foreach ($genre_list as $item)
                            <a class="dropdown-item" href="{{ mopie_route('genre', ['id' => $item->id, 'slug' => str_slug($item->name)]) }}" title="{{ $item->name }}">{{ $item->name }}</a>
                        @endforeach
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{{ mopie_route('people.popular') }}" title="{{ __('menu.popular_people') }}">{{ __('menu.popular_people') }}</a>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link cursor mb-3 mb-md-0" data-toggle="modal" data-target="#modalLang">Lang</a>
                </li>
            </ul>
            <form class="form-inline my-2 my-md-0" action="{{ mopie_route('home') }}" method="GET">
                <input class="form-control" type="text" name="s"  placeholder="{{ __('menu.search') }}" aria-label="{{ __('menu.search') }}">
            </form>
        </div>
    </nav>
    <div class="container my-3">
        @yield('content')
    </div>

    <footer class="footer mt-auto py-3">
        <div class="container text-center text-md-left">
            <div class="d-flex flex-column flex-md-row justify-content-between">
                <div class="copyright mb-3 mb-md-0">Copyright © {{ date('Y') }} <span class="text-capitalize">{{ $_SERVER['SERVER_NAME'] }}</span> | All rights
                    reserved</div>
                <div class="footer_links">
                    @foreach ($pages as $page)
                        <a href="{{ route('page', $page) }}">{{ $page->title }}</a>
                    @endforeach
                </div>
            </div>
        </div>
    </footer>
    @include(get_theme().'._modal_lang')

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="//code.jquery.com/jquery-3.4.1.slim.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
    <script src="//stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
    {!! get_setting('analytic') !!}
  </body>
</html>