@extends('admin.index')
@section('content')

<form action="{{ route('admin.weeklyPrograms.create') }}" method="post" enctype="multipart/form-data">
    @csrf
    <div class="card">
        <div class="border-bottom card-header">
            <h4 class="card-title">{{ trans('general.create_weeklyPrograms') }}</h4>
        </div>
        <div class="card-body">
            <div class="row pt-2">
                <div class=" col-md-6 col-12">
                    <div class="row">
                        <div class="col-12">
                            <div class="mb-1">
                                <label class="form-label" for="title">{{ trans('general.title') }}</label>
                                <input required type="text" name="title" class="form-control" id="title" value="{{old('title')? old('title') : ''}}">
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="mb-1">
                                <label class="form-label" for="divisionSelect">{{ trans('general.division') }}</label>
                                <select required name="division_id" class="form-select" id="divisionSelect">
                                    <option value="">--</option>
                                    @foreach($divisions as $division)
                                    <option value="{{ $division->id }}" {{ old('division_id')? ($division->id == old('division_id')? 'selected':'') : ''}}>

                                        {{ $division->stage }} |
                                        {{ $division->level }} |
                                        {{ $division->title }} |

                                    </option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class=" col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="description">{{ trans('general.description') }}</label>
                        <textarea  name="description" class="form-control" id="description" rows="4">{{old('description')? old('description') : ''}}</textarea>
                    </div>
                </div>
                <div class=" col-12">
                    <div class="mb-1">
                        <label class="form-label" for="attachments">{{ trans('general.attachments') }}</label>
                        <input required type="file" name="attachments" id="attachments" class="form-control" value="{{old('attachments')? old('attachments') : ''}}">

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

        <div class="card-footer">
            <button type="submit" class="btn btn-primary waves-effect waves-float waves-light">{{ trans('general.save') }}</button>
            <button type="reset" class="btn btn-outline-secondary waves-effect">{{ trans('general.reset') }}</button>
        </div>
    </div>

</form>

@push('scripts')

<script>

</script>

@endpush

@push('header')


@endpush
@endsection