<?php $__env->startSection("title", env("APP_NAME") . " :: Página de Acompanhamento - Paciente com Fibromialgia - Endereço"); ?>
<?php $__env->startSection('content'); ?>

<div class="card shadow">

    <?php $headLine = "<i class='fa-solid fa-user-injured'></i> Página de Acompanhamento - Paciente com Fibromialgia - Endereço"; ?>

    <?php echo $__env->make('components.buttons._headLineButtonsBackAdd', [
    'headLine' => __($headLine),
    "permission" => "GERENCIADOR_DE_CONTA_ANGRA",
    ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="card-body">
        <form action="<?php echo e(route("admin.saude.fibromialgia.perfil.enderecoUpdate", [$paciente->id, $endereco->id])); ?>" method="post" enctype="multipart/form-data">

            <?php echo $__env->make("errors.messageFlash", array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php echo csrf_field(); ?>
            <?php echo method_field('post'); ?>

            <?php echo $__env->make('components.modal._modelProfile', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

            <hr>

            <div class="tab-content">

                <div class="mb-3">

                    <div class="row">
                        <div class="col-sm-12 col-md-3">
                            <!-- Campo CEP -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "CEP",
                            "name" => "cep",
                            "id" => "zipCode",
                            "required" => true,
                            "type" => null,
                            "old" => old('cep', $endereco?->cep),
                            "oninput" => "javascript:aplicarMascaraCEP(this)",
                            "readonly" => false,
                            "small" => null,
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="col-sm-12 col-md-6">
                            <!-- Campo Logradouro -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "Logradouro",
                            "name" => "logradouro",
                            "id" => "street",
                            "required" => true,
                            "type" => null,
                            "old" => old('logradouro', $endereco?->logradouro),
                            "oninput" => "javascript:this.value = this.value.toUpperCase()",
                            "readonly" => false,
                            "small" => null,
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="col-sm-12 col-md-3">
                            <!-- Campo Número -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "Número",
                            "name" => "numero",
                            "id" => "numero",
                            "required" => false,
                            "type" => null,
                            "old" => old('numero', $endereco?->numero),
                            "oninput" => "javascript:this.value = this.value.toUpperCase()",
                            "readonly" => false,
                            "small" => null,
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-12 col-md-3">
                            <!-- Campo Complemento -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "Complemento",
                            "name" => "complemento",
                            "id" => "complemento",
                            "required" => false,
                            "type" => null,
                            "old" => old('complemento', $endereco?->complemento),
                            "oninput" => "javascript:this.value = this.value.toUpperCase()",
                            "readonly" => false,
                            "small" => null,
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="col-sm-12 col-md-3">
                            <!-- Campo Cidade -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "Cidade",
                            "name" => "cidade",
                            "id" => "city",
                            "required" => true,
                            "type" => null,
                            "old" => old('cidade', $endereco?->cidade),
                            "oninput" => "javascript:this.value = this.value.toUpperCase()",
                            "readonly" => false,
                            "small" => null,
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="col-sm-12 col-md-3">
                            <!-- Campo Bairro -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "Bairro",
                            "name" => "bairro",
                            "id" => "neighborhood",
                            "required" => true,
                            "type" => null,
                            "old" => old('bairro', $endereco?->bairro),
                            "oninput" => "javascript:this.value = this.value.toUpperCase()",
                            "readonly" => false,
                            "small" => null,
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="col-sm-12 col-md-3">
                            <!-- Campo UF -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "UF",
                            "name" => "uf",
                            "id" => "state",
                            "required" => true,
                            "type" => null,
                            "old" => old('uf', $endereco?->uf),
                            "oninput" => "javascript:this.value = this.value.toUpperCase()",
                            "readonly" => false,
                            "small" => null,
                            "listName" => "estadosBrasileiros",
                            "arrayList" => [
                            'AC', 'AL', 'AM', 'AP', 'BA', 'CE', 'DF', 'ES', 'GO',
                            'MA', 'MG', 'MS', 'MT', 'PA', 'PB', 'PE', 'PI', 'PR',
                            'RJ', 'RN', 'RO', 'RR', 'RS', 'SC', 'SE', 'SP', 'TO'
                            ],
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-12">
                            <!-- Campo Comprovante -->
                            <?php echo $__env->make('components.inputs._inputType',[
                            "for" => null,
                            "label" => "Comprovante de endereço",
                            "name" => "comprovante",
                            "id" => null,
                            "required" => false,
                            "type" => 'file',
                            "old" => null,
                            "oninput" => null,
                            "readonly" => true,
                            "small" => null,
                            "accept" => 'image/jpeg,image/jpg,image/png,image/gif,.pdf',
                            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-12 text-center">
                            <?php if($endereco?->comprovante != null && $endereco?->comprovante != "pmar\assets\img\comprovante-residencia-default.jpg"): ?>
                            <hr/>
                            <a href="<?php echo e(asset($endereco?->comprovante)); ?>" class="text-primary" download>
                                <?php echo e(__("Comprovante de endereço")); ?> - <small><?php echo e(__("baixar")); ?></small> <i class="fa-solid fa-download"></i>
                            </a>
                            <?php endif; ?>
                        </div>

                    </div>

                    <div class="row">
                        <div class="d-flex justify-content-between mt-4">
                            <a class="btn btn-outline-secondary" href="<?php echo e(route("admin.saude.fibromialgia.perfil.show", $paciente->id)); ?>">
                                <i class="fa-solid fa-arrow-left-long"></i> <?php echo e(__("Voltar")); ?>

                            </a>
                            <button class="btn btn-primary d-inline" type="submit">
                                <i class="fa-solid fa-user-plus"></i> <?php echo e(__("Salvar")); ?>

                            </button>
                        </div>
                    </div>
                </div>
        </form>

    </div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin.theme', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/portal/resources/views/admin/saude/fibromialgia/perfil/endereco.blade.php ENDPATH**/ ?>