@extends('layouts.admin.theme')
@section("title", env("APP_NAME") . " :: Novas imagens para: " . $parque->nome)
@section('content')

    <form action="{{ route('admin.parquesJardins.arquivos.store', $parque->id) }}" method="post" enctype="multipart/form-data">
        <div class="container mt-4">
            <div class="row">
                <div class="col-12">
                    <div class="card shadow">
                        <div class="card-header bg-primary text-white d-flex justify-content-between align-items-center mb-3">
                            <h5 class="mb-0">{{ "Novas imagens para: " . $parque->nome }}</h5>
                        </div>
                        <div class="card-body">
                            @csrf
                            @include("errors.messageFlash")

                            <div class="mb-3">
                                <label for="link" class="form-label text-bold">Escolhas as imagens:</label>
                                <input type="hidden" name="tipo" id="tipo" value="Imagem">
                                <input type="file"  class="form-control @error('link') is-invalid @enderror"  name="link[]"  id="link"  accept="image/*"  multiple required />
                                @error('link')
                                    <small class="text-danger text-bold">{{ $message }}</small><br>
                                @enderror
                                <small class="text-info text-bold">
                                * Apenas documentos de imagem: JPG, JPEG, PNG, GIF, BMP, WEBP.
                                </small>
                            </div>
                            <div class="mb-3">
                                <button class="btn btn-lg btn-secondary d-inline" onclick="javascript:window.location.href='{{ route("admin.parquesJardins.arquivos.index", $parque->id) }}'" type="button">{{ __("Voltar") }}</button>
                                <button class="btn btn-lg btn-dark  d-inline" type="submit">{{ __('Cadastrar') }}</button>       
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>

@endsection