@extends('layouts.admin.theme')
@section("title", env("APP_NAME") . " :: Editar Atendimento")
@section('content')

    <div class="card shadow">

        @php $headLine = "<i class='fa-solid fa-headset'></i> Editar Atendimento"; @endphp

        @include('components.buttons._headLineButtonsBackAdd', [
                        'headLine' => __($headLine),
                        'routeBack' => 'admin.contaAngra.chamados.index',
                        'routeBackParams' => [], 
                        'nameBack' => __("Voltar"),
                        "permission" => "GERENCIADOR_DE_CONTA_ANGRA",
                    ])

        <div class="card-body">
            <form action="{{ route("admin.contaAngra.chamados.update", $chamado->id) }}" method="post" enctype="multipart/form-data">

                @csrf
                @method('put')

                @include("errors.messageFlash")
                @include('components.modal._modelProfile')

                <ul class="nav nav-pills mb-3 justify-content-center bg-light p-2 rounded shadow-sm" role="tablist">

                    @include('components.lists._liLinkBtnNavInterna', [
                        'items' => [
                            ['class' => 'active bg-success disabled', 'hash' => 'primeiraSection', 'label' => 'Assunto'],
                            ['class' => 'disabled', 'hash' => 'segundaSection', 'label' => 'Solicitação'],
                            ['class' => 'disabled', 'hash' => 'terceiraSection', 'label' => 'Anexos'],
                        ]
                    ])

                </ul>

                <div class="tab-content">
                    
                    
                    
                    <div class="row">
                        <div class="col-sm-12 col-md-6">
                        <!-- Campo Convenios -->
                                    @include('components.inputs._selectType', [
                                        "for" => "convenio",
                                        "label" => "Serviço ou convênio",
                                        "name" => "convenio",
                                        "id" => "convenio",
                                        "required" => true,
                                        "readonly" => false,
                                        "placeholder" => "Selecione uma opção...",
                                        "options" => $convenios,
                                        "selected" => old('convenio', $chamado->convenio),
                                        "small" => "Deseja abrir um chamado para qual serviço ou convênio.",
                                    ])
                        </div>
                        <div class="col-sm-12 col-md-6">
                            <!-- Campo Assunto -->
                                    @include('components.inputs._inputType',[
                                        "for" => null,
                                        "label" => "Assunto",
                                        "name" => "assunto",
                                        "id" => null,
                                        "required" => true,
                                        "type" => null,
                                        "old" => old('assunto', $chamado->assunto),
                                        "oninput" => "javascript:this.value = this.value
                                            .toLocaleUpperCase('pt-BR')
                                            .replace(/[<>]/g, '')
                                            .replace(/\s{2,}/g, ' ')
                                            .trimStart();",
                                        "readonly" => false,
                                        "small" => null,
                                    ])
                        </div>
                    </div>
                    <div class="row">
                        <div class="d-flex justify-content-between mt-4">
                            <a class="btn btn-dark" href="{{ route("admin.contaAngra.chamados.index") }}">
                                <i class="fa-solid fa-arrow-left-long"></i> {{ __("Sair") }}
                            </a>
                            <button class="btn btn-primary d-inline" type="submit">
                                <i class="fa-solid fa-user-plus"></i> {{ __("Salvar e Prosseguir") }}
                            </button>
                        </div>
                    </div>
                </div>
            </form>

        </div>
    </div>

@endsection