@extends('admin.layouts.layout')
@section('content')
    <div class="col-xl-12">
        <div class="card">
            <div class="card-header card-header-bordered">
                <h3 class="card-title">Cadastrando Vídeo</h3>
            </div>
            <div class="card-body">
                <p class="text-muted">Cadastrando Vídeos no Sistema</p>
                <a class="btn btn-outline-primary btn-block d-grid gap-2" type="button" href="{{ route('videosgaleria.index') }}"
                    role="button">Ver todos</a>
            </div>
            <div class="card">
                <div class="card-body">
                    <form action="{{ route('videosgaleria.store') }}" method="POST" class="form-horizontal"
                        enctype="multipart/form-data">
                        @csrf
                        <div class="box box-info">
                            <div class="row">
                                <div class="form-group col-md-9">
                                    <label class="form-label">Categoria</label>
                                    <select class="form-control @error('id_categoria') is-invalid @enderror"
                                        name="id_categoria" value="{{ old('id_categoria') }}">
                                        <option value="">Selecione uma categoria</option>
                                        @foreach ($categoria as $categoria)
                                            <option value="{{ $categoria->id }}">{{ $categoria->categoria_nome }}</option>
                                        @endforeach
                                    </select>
                                </div>
                                <div class="form-group col-md-3">
                                    <label class="col-form-label">Data de Cadastro<span>*</span></label>
                                    <input type="date" name="dt_cadastro" value="{{ old('dt_cadastro') }}"
                                        class="form-control @error('dt_cadastro') is-invalid @enderror">
                                </div>
                                <div class="form-group col-md-12">
                                    <label class="col-form-label">Título do Vídeo<span>*</span></label>
                                    <input type="text" name="video_titulo" value="{{ old('video_titulo') }}"
                                        class="form-control @error('video_titulo') is-invalid @enderror">
                                </div>
                                <div class="form-group col-md-12">
                                    <label class="col-form-label">URL do Vídeo<span>*</span></label>
                                    <input type="text" name="video_url" value="{{ old('video_url') }}"
                                        class="form-control @error('video_url') is-invalid @enderror">
                                </div>
                                <div class="form-group col-md-12">
                                    <label class="col-form-label">Descrição<span>*</span></label>
                                    <input type="text" name="video_descricao" value="{{ old('video_descricao') }}"
                                        class="form-control @error('video_descricao') is-invalid @enderror">
                                </div>
                                <div class="form-group col-md-12">
                                    <label class="col-form-label">Créditos<span>*</span></label>
                                    <input type="text" name="video_creditos" value="{{ old('video_creditos') }}"
                                        class="form-control @error('video_creditos') is-invalid @enderror">
                                </div>
                            </div>
                            <br>
                            <div class="form-group">
                                <button type="submit" class="btn btn-outline-success btn-sm w-100"
                                    name="form1">Gravar</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
