<div class="module module-wrapper">
    <div class="module-main">
        <div class="module-heading"><h2 class="module-title"><i class="icon-cate-dy" style="color:#FF0000"></i>
                {{$item['label']}}</h2><a class="more" href="{{$item['link']}}" title="{{$item['label']}}">Xem thêm<i class="icon-arrow-right-o"></i></a>
        </div>
        <div class="module-list module-lines-list">
            <div class="module-items">
                @foreach ($item['data'] as $movie)
                    @include('themes::themedy.inc.section.movie_card')
                @endforeach
            </div>
        </div>
    </div>

    <div class="module-side">
        <div class="module-heading"><h2 class="module-title">Top</h2></div>
        <div class="module-side-list module-bg">
            <div class="scroll-box">
                <div class="module-textlist scroll-content">
                    @php $key =0; @endphp
                    @foreach ($item['topview'] as $movie)
                        @php
                            $key++;
                        switch ($key) {
                            case 1:
                                $class_top = 'top-1';
                                break;
                            case 2:
                                $class_top = 'top-2';
                                break;
                            case 3:
                                $class_top = 'top-3';
                                break;
                            default:
                                $class_top = '';
                                break;
                        }
                    @endphp
                    <a href="{{$movie->getUrl()}}"
                       class="text-list-item">
                        <div class="text-list-num top-main {{$class_top}}">{{$key}}</div>
                        <div class="text-list-title"><h3>{{$movie->name}}</h3>
                            <p>Lượt xem : {{$movie->view_total}}</p></div>
                    </a>
                    @endforeach

                </div>
            </div>
        </div>
    </div>
</div>
