@extends('layouts.pmar.theme') @section('title', env('APP_NAME') . ' - ' . __('Carta de Serviços')) @push('styles') @endpush @section('content') @php $categoriaAtiva = $categorias->firstWhere('id_tipo', (int) $filtroTipo); @endphp {{-- Breadcrumb --}}

{{-- Cabeçalho da página --}}

{{ __('Carta de Serviços') }}

{{ __('Serviços municipais oferecidos pela Prefeitura de Angra dos Reis') }} @if ($categoriaAtiva) — {{ $categoriaAtiva->tip_descricao }} @endif

@if ((int) $filtroTipo > 0) @endif
{{-- Conteúdo principal --}}
@if ($servicos === null) {{-- === Vista de categorias === --}} @if ($categorias->isEmpty())

{{ __('As categorias de serviço ainda não foram cadastradas.') }}

@else
{{ __('Serviços Municipais') }}

{{ __('Navegue por categoria') }}

{{ __('Escolha uma área para ver os serviços disponíveis.') }}

@foreach ($categorias as $categoria) @php $imgFallback = "temp/cartadeservicos.angra.rj.gov.br/servicos/images/CDS/0.png"; $imgPublic = public_path("temp/cartadeservicos.angra.rj.gov.br/servicos/images/CDS/{$categoria->id_tipo}.jpg"); $imgLegacy = file_exists($imgPublic) ? "temp/cartadeservicos.angra.rj.gov.br/servicos/images/CDS/{$categoria->id_tipo}.jpg" : $imgFallback; $imgSrc = \Illuminate\Support\Str::startsWith((string) $categoria->tip_class, 'storage/') ? $categoria->tip_class : $imgLegacy; @endphp @endforeach
@endif @else {{-- === Vista de resultados === --}}
{{-- Lista de serviços --}}
{{-- Barra de resultados --}}
@if ($filtroPesquisa !== '') {{ __('Resultados para') }} "{{ $filtroPesquisa }}" — @endif {{ $servicos->total() }} {{ __('serviço(s) encontrado(s)') }} @if ($filtroPesquisa !== '' || (int) $filtroTipo > 0) {{ __('Limpar filtros') }} @endif
@if ($servicos->isEmpty())

{{ __('Nenhum serviço encontrado para os filtros informados.') }}

{{ __('Ver todos os serviços') }}
@else
@foreach ($servicos as $servico) @endforeach
@if ($servicos->total() > 0)
{{ $servicos->links() }}
@endif @endif
{{-- Sidebar --}}
@endif
@endsection