@extends(get_theme().'.components.layouts')

@section('content')
    <section class="mopie-fade">
        <div class="container">
            <div class="row">
                <div class="col-12 col-md-2 mb-3">
                    <img class="img-fluid rounded" src="{{ img_poster($data->profile_path) }}" alt="{{ $data->name }}">
                </div>
                <div class="col-12 col-md-10">
                    <h1 class="h3 mb-4">{{ $data->name }}</h1>
                    <div class="h6">{{ __('utilities.biography') }}</div>
                    <p class="text-muted" style="max-height: 200px; overflow:auto">{{ $data->biography }}</p>
                    <div class="entry-table">
                        <ul>
                            <li>{{ __('utilities.know_for') }}: <span>{{ $data->known_for_department }}</span></li>
                            <li>{{ __('utilities.birthday') }}: <span>{{ $data->birthday }}</span></li>
                            <li>{{ __('utilities.place_of_birth') }}: <span>{{ $data->place_of_birth }}</span></li>
                            <li>{{ __('utilities.also_know_as') }}: <span>{{ implode($data->also_known_as, ', ') }}</span></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="py-4">
        <div class="container p-3 p-md-4 rounded-lg mb-5">
            <div class="row">
                <div class="col-12 mb-4">
                    <h3 class="h4">{{ __('section.title.movie_list_of', ['name' => $data->name]) }}</h3>
                </div>
                @foreach (block_id_lists($data->movie_credits->cast) as $item)
                    @include(get_theme().'.components.item_movie', ['class' => 'col-6 col-md-2'])
                @endforeach
            </div>
        </div>
    </section>
@endsection
