@extends('manage.layout')

@section('content')
    <h1>Cinemas</h1>
    <hr/><br/>
    <h2>Cinemas ({{ count(Auth::user()->cinemas()) }} / {{ $cinemas->count() }})</h2>
    <div>
        @if (count(Auth::user()->cinemas()) > 0)
            <ul>
                @foreach(Auth::user()->cinemas() as $cinema)
                    <li>
                        <a href="{{ route('manage.cinema', ['id' => $cinema->cinema_id]) }}">
                            <div>
                                <h3>{{ $cinema->cinema_name }}</h3>
                                <span class="big-stat">{{ $cinema->address->address_city }}</span>
                            </div>
                        </a>
                    </li>
                @endforeach
            </ul>
        @else
            <div class="warning">
                <h3>No Cinemas</h3>
                <span>Did you have permission?</span>
            </div>
        @endif
    </div>
    <br/>
@endsection