@extends('layouts.admin.theme')

@section('title', __('Editar Boletim Meteorológico'))

@section('content')
@include('errors.messageFlash')

<div class="card shadow-lg">
    @if(collect(auth()->user()?->listaPermissoes())->contains('GERENCIADOR_DE_BOLETINS_METEOROLOGICOS'))
        <div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
            <h5 class="my-2">
                <i class="fas fa-cloud-sun-rain me-2"></i> {{ __('Editar Boletim Meteorológico') }}
            </h5>
            <div class="ms-auto">
                @include('components.buttons._backButton', ['url' => 'admin.boletim.meteorologico.index', 'label' => __('Voltar')])
            </div>
        </div>
    @endif

    @include('admin.defesaCivil.boletim_meteorologico.partials.form', [
        'boletim' => $boletim,
        'sobreavisos' => $sobreavisos,
        'options' => $options,
        'formAction' => route('admin.boletim.meteorologico.update', $boletim),
        'method' => 'PUT',
        'submitLabel' => __('Atualizar Boletim')
    ])
</div>

@push('styles')
<link rel="stylesheet" href="{{ asset('pmar/css/defesa-civil/boletim-meteorologico-admin.css') }}">
@endpush

@push('scripts')
<script src="{{ asset('pmar/js/defesa-civil/boletim-meteorologico-admin.js') }}"></script>
@endpush
@endsection
