@extends('layouts.admin.theme') @section("title", env("APP_NAME") . " :: Visite Angra - Novo Atrativo") @section('content')
@php $headLine = " Visite Angra - Novo Atrativo Turístico"; @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), 'routeBack' => 'admin.visiteAngra.atrativos.index', 'routeBackParams' => [], 'nameBack' => __("Voltar"), "permission" => "GERENCIADOR_VISITE_ANGRA", ])
@csrf @include("errors.messageFlash")
@include('components.inputs._selectType', [ "for" => "corredor_id", "label" => "Corredor turístico", "name" => "corredor_id", "id" => null, "required" => true, "readonly" => false, "placeholder" => "Selecione um corredor...", "options" => collect($corredores)->mapWithKeys(fn($c) => [ $c->id => "{$c->corredor}" ])->toArray(), "selected" => old('corredor_id'), "small" => "Selecione um corredor turístico.", ])
@include('components.inputs._selectType', [ "for" => "ponto_id", "label" => "Ponto turístico", "name" => "ponto_id", "id" => null, "required" => true, "readonly" => false, "placeholder" => "Selecione um ponto...", "options" => collect($pontos)->mapWithKeys(fn($p) => [ $p->id => "{$p->ponto}" ])->toArray(), "selected" => old('ponto_id'), "small" => "Selecione um ponto turístico.", ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Nome do atrativo turístico", "name" => "atrativo", "id" => null, "required" => true, "type" => null, "old" => old('atrativo'), "oninput" => null, "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Subtitulo", "name" => "subtitulo", "id" => null, "required" => true, "type" => null, "old" => old('subtitulo'), "oninput" => null, "readonly" => false, "small" => null, ])
@foreach($categorias as $categoria) {{ $categoria->categoria }} @endforeach

@include('components.modal._mapModal',[ "label" => "Clique no mapa e escolha um determinado ponto", ])

@include('components.inputs._inputType',[ "for" => null, "label" => "Latitude", "name" => "latitude", "id" => null, "required" => true, "type" => null, "old" => old('latitude'), "oninput" => "javascript:this.value = this.value.toUpperCase()", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Longitude", "name" => "longitude", "id" => null, "required" => true, "type" => null, "old" => old('longitude'), "oninput" => "javascript:this.value = this.value.toUpperCase()", "readonly" => false, "small" => null, ])

@include('components.inputs._textarea', [ 'label' => 'Descrição', 'name' => 'descricao', 'id' => null, 'rows' => 0, 'required' => false, 'height' => '100px', 'class' => null, 'style' => null, 'value' => old('descricao'), ])

@include('components.inputs._inputType',[ "for" => null, "label" => "Foto Destaque", "name" => "foto", "id" => null, "required" => true, "type" => 'file', "old" => null, "oninput" => null, "readonly" => true, "small" => "Formatos permitidos: JPEG, PNG ou GIF. Tamanho máximo: 5 MB.", "accept" => 'image/jpeg,image/jpg,image/png,image/gif', ])
@include('components.inputs._selectType', [ "for" => "status", "label" => "Status", "name" => "status", "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusEnum::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('status'), "placeholder" => "Selecione o status...", "small" => "Informe o status atual deste ponto turístico.", "onchange" => null ])
@include('components.buttons._backAndSend',[ 'routeBack' => 'admin.visiteAngra.atrativos.index', 'textBack' => "Voltar", 'textSend' => "Cadastrar", ])
@endsection