@extends('layouts.admin.theme')
@section("title", env("APP_NAME") . " :: Página de Acompanhamento - Paciente com Fibromialgia - Arquivos")
@section('content')

<div class="card shadow">

    @php $headLine = "<i class='fa-solid fa-user-injured'></i> Página de Acompanhamento - Paciente com Fibromialgia - Arquivos"; @endphp

    @include('components.buttons._headLineButtonsBackAdd', [
    'headLine' => __($headLine),
    "permission" => "GERENCIADOR_DE_CONTA_ANGRA",
    ])

    <div class="card-body">

        @include('components.modal._modelProfile')

        <div class="tab-content">
            <div class="mb-3">
                @if($paciente->fileFoto != "pmar/assets/img/icons/neuto.png" && $paciente->fileFoto != "")
                <div class="d-flex justify-content-between align-items-center mb-2 laudo-wrapper" id="laudo-fileFoto">
                    <div>
                        <a href="{{ url($paciente->fileFoto) }}" class="text-primary" download>
                            Foto 3x4 - <small>baixar arquivo</small> <i class="fa-solid fa-download"></i>
                        </a>
                    </div>
                </div>
                @endif

                @if($paciente->fileLaudo != "pmar/assets/img/icons/neuto.png" && $paciente->fileLaudo != "")
                <div class="d-flex justify-content-between align-items-center mb-2 laudo-wrapper" id="laudo-fileLaudo">
                    <div>
                        <a href="{{ url($paciente->fileLaudo) }}" class="text-primary" download>
                            Laudo Médico - <small>baixar arquivo</small> <i class="fa-solid fa-download"></i>
                        </a>
                    </div>
                </div>
                @endif

                @if($paciente->fileRG != "pmar/assets/img/icons/neuto.png" && $paciente->fileRG != "")
                <div class="d-flex justify-content-between align-items-center mb-2 laudo-wrapper" id="laudo-fileRG">
                    <div>
                        <a href="{{ url($paciente->fileRG) }}" class="text-primary" download>
                            RG - <small>baixar arquivo</small> <i class="fa-solid fa-download"></i>
                        </a>
                    </div>
                </div>
                @endif

                @if($paciente->fileCPF != "pmar/assets/img/icons/neuto.png" && $paciente->fileCPF != "")
                <div class="d-flex justify-content-between align-items-center mb-2 laudo-wrapper" id="laudo-fileCPF">
                    <div>
                        <a href="{{ url($paciente->fileCPF) }}" class="text-primary" download>
                            CPF - <small>baixar arquivo</small> <i class="fa-solid fa-download"></i>
                        </a>
                    </div>
                </div>
                @endif

                @if($paciente->fileCartaoSUS != "pmar/assets/img/icons/neuto.png" && $paciente->fileCartaoSUS != "")
                <div class="d-flex justify-content-between align-items-center mb-2 laudo-wrapper" id="laudo-fileCartaoSUS">
                    <div>
                        <a href="{{ url($paciente->fileCartaoSUS) }}" class="text-primary" download>
                            Cartão SUS - <small>baixar arquivo</small> <i class="fa-solid fa-download"></i>
                        </a>
                    </div>
                </div>
                @endif


            </div>
            <div class="mb-3">
                <form action="{{ route("admin.saude.fibromialgia.perfil.arquivosUpdate", $paciente->id) }}" method="post" enctype="multipart/form-data">
                    <div class="mb-3">

                        @include("errors.messageFlash")
                        @csrf
                        @method('post')

                        <!-- Campo Foto 3x4 -->
                        @include('components.inputs._inputType',[
                        "for" => null,
                        "label" => "Foto 3x4",
                        "name" => "fileFoto",
                        "id" => null,
                        "required" => false,
                        "type" => 'file',
                        "old" => null,
                        "oninput" => null,
                        "readonly" => true,
                        "small" => "(.jpg, .jpeg, .png)",
                        "accept" => 'image/*',
                        ])

                    </div>
                    <div class="mb-3">

                        <!-- Campo RG -->
                        @include('components.inputs._inputType',[
                        "for" => null,
                        "label" => "Laudo Médico",
                        "name" => "fileLaudo",
                        "id" => null,
                        "required" => false,
                        "type" => 'file',
                        "old" => null,
                        "oninput" => null,
                        "readonly" => true,
                        "small" => "(.pdf, .jpg, .jpeg, .png)",
                        "accept" => 'application/pdf,image/*',
                        ])

                    </div>
                    <div class="mb-3">

                        <!-- Campo RG -->
                        @include('components.inputs._inputType',[
                        "for" => null,
                        "label" => "RG",
                        "name" => "fileRG",
                        "id" => null,
                        "required" => false,
                        "type" => 'file',
                        "old" => null,
                        "oninput" => null,
                        "readonly" => true,
                        "small" => "(.pdf, .jpg, .jpeg, .png)",
                        "accept" => 'application/pdf,image/*',
                        ])

                    </div>
                    <div class="mb-3">

                        <!-- Campo CPF -->
                        @include('components.inputs._inputType',[
                        "for" => null,
                        "label" => "CPF",
                        "name" => "fileCPF",
                        "id" => null,
                        "required" => false,
                        "type" => 'file',
                        "old" => null,
                        "oninput" => null,
                        "readonly" => true,
                        "small" => "(.pdf, .jpg, .jpeg, .png)",
                        "accept" => 'application/pdf,image/*',
                        ])

                    </div>
                    <div class="mb-3">

                        <!-- Campo Cartão SUS -->
                        @include('components.inputs._inputType',[
                        "for" => null,
                        "label" => "Cartão SUS",
                        "name" => "fileCartaoSUS",
                        "id" => null,
                        "required" => false,
                        "type" => 'file',
                        "old" => null,
                        "oninput" => null,
                        "readonly" => true,
                        "small" => "(.pdf, .jpg, .jpeg, .png)",
                        "accept" => 'application/pdf,image/*',
                        ])
                    </div>
                    <div class="row">
                        <div class="d-flex justify-content-between mt-4">
                            <a class="btn btn-outline-secondary" href="{{ route("admin.saude.fibromialgia.perfil.show", $paciente->id) }}">
                                <i class="fa-solid fa-arrow-left-long"></i> {{ __("Voltar") }}
                            </a>
                            <button class="btn btn-primary d-inline" type="submit">
                                <i class="fa-solid fa-user-plus"></i> {{ __("Salvar") }}
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@endsection