@extends('admin.layouts.master')
@section('title', $type . __('download_link'))
@section('content')

<section class="oftions">
    <div class="container-fluid">
        <div class="row">
            <div class="col col-md-12">
                <div class="header-top d-flex justify-content-between align-items-center">
                    @if(strtolower($type) === 'episode')
                    <h3 class="section-title">{{ __('episode') }} {{ __('download_links') }}</h3>
                    @elseif(strtolower($type) === 'movie')
                    <h3 class="section-title">{{ __('movie') }} {{ __('download_links') }}</h3>
                    @else
                    <h3 class="section-title">{{ strUppercase($type) }} {{ __('download_links') }}</h3>
                    @endif
                    <div class="oftions-content-right mb-12">
                        <a href="javascript:void(0)" class="d-flex align-items-center btn sg-btn-primary gap-2"
                            onclick="ajaxModal('modal-md', '{{route('admin.download.link.add', ['type' => $type, 'videoId' => $videoId])}}', '{{__('download_link_add')}}')">
                            <i class="las la-plus"></i>
                            <span>{{__('add_download_link') }}</span>
                        </a>

                        @if ($type == 'movie')
                        <a href="{{ route('admin.movie.upload.downloads', ['movie_id' => $videoId]) }}" class="d-flex align-items-center btn sg-btn-primary gap-2">
                            <i class="las la-plus"></i>
                            <span>{{ __('manage_movie_file') }}</span>
                        </a>
                        @endif

                    </div>
                </div>
                <div class="default-tab-list default-tab-list-v2  bg-white redious-border p-20 p-sm-30">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="default-list-table table-responsive yajra-dataTable">
                                {{ $dataTable->table() }}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

@endsection
@push('js')
{{ $dataTable->scripts() }}
@endpush