@extends('layouts.admin.theme')
@section("title", env("APP_NAME") . " :: Chamados - Anexos da Solicitação de Atendimento")
@section('content')

<div class="card shadow">

    @php $headLine = "<i class='fa-solid fa-headset'></i> Chamados - Anexos da Solicitação de 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.arquivosUpdate", [$chamado->id, $mensagem->id]) }}" method="post" enctype="multipart/form-data">

            @csrf
            @method('post')

            @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' => 'active bg-success disabled', 'hash' => 'segundaSection', 'label' => 'Solicitação'],
                    ['class' => 'active bg-success disabled', 'hash' => 'terceiraSection', 'label' => 'Anexos'],
                    ]
                ])

            </ul>

            <div class="tab-content">

                <div class="row">
                    <div class="col-12">
                        <ul class="list-group">
                            <li class="list-group-item"><strong>{{ __("Assunto") }}</strong>: {{ $chamado->assunto }}</li>
                            <li class="list-group-item"><strong>{{ __("Solicitação") }}</strong>: {!! $mensagem->mensagem !!}</li>
                            <li class="list-group-item"><strong>{{ __("Data") }}</strong>: {{ date("d/m/Y H:i", strtotime($chamado->created_at)) }}</li>
                        </ul>
                        <hr/>
                    </div>
                </div>

                <div class="row">
                    <div class="col-12  text-wrap">
                        <!-- Campo Arquivos -->
                        @include('components.inputs._inputType',[
                            "for" => "link",
                            "label" => "Arquivos",
                            "name" => "link[]",
                            "id" => 'link',
                            "required" => false,
                            "type" => 'file',
                            "old" => null,
                            "oninput" => null,
                            "readonly" => true,
                            "multiple" => true,
                            "small" => "* Apenas documentos de imagem: PDF, JPG, JPEG, PNG, GIF, BMP, WEBP.",
                            "accept" => 'application/pdf,image/*',
                        ])
                    </div>
                </div>
                <div class="row">
                    <div class="d-flex justify-content-between mt-4">
                        <a class="btn btn-dark" href="{{ route("admin.contaAngra.chamados.solicitacao", $chamado->id) }}">
                            <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 Finalizar") }}
                        </button>
                    </div>
                </div>
            </div>
        </form>

    </div>
</div>

@endsection