@props([
    'secretaria' => null,
    'links' => collect(),
])

@if ($secretaria)
    <article class="ma-org-card ma-org-card--links">
        <h2 class="ma-org-card__title">{{ __('Saiba mais') }}</h2>

        <ul class="ma-org-links list-unstyled mb-0">
            <li>
                <a class="ma-org-links__item" href="{{ route('paginas.formacao-academica', $secretaria->slug) }}">
                    <span class="ma-org-links__text">
                        @if ($secretaria->type == 'SECRETARIA')
                            @if ($secretaria->pronunciation == 'SECRETARIO')
                                {{ __('Secretário') }}
                            @elseif ($secretaria->pronunciation == 'PROCURADO_GERAL_DO_MUNICIPIO')
                                {{ __('Procurador-Geral') }}
                            @elseif ($secretaria->pronunciation == 'CONTROLADOR_GERAL_DO_MUNICIPIO')
                                {{ __('Controlador-Geral') }}
                            @else
                                {{ __('Secretária') }}
                            @endif
                        @elseif ($secretaria->type == 'FUNDACAO' || $secretaria->type == 'AUTARQUIA')
                            {{ __('Presidente') }}
                        @elseif ($secretaria->type == 'SUPERINTENDENCIA')
                            {{ __('Superintendente') }}
                        @elseif ($secretaria->type == 'DIRETORIA')
                            @if ($secretaria->pronunciation == 'DIRETOR')
                                {{ __('Diretor') }}
                            @else
                                {{ __('Diretora') }}
                            @endif
                        @elseif ($secretaria->type == 'SECRETARIA_EXECUTIVA')
                            @if ($secretaria->pronunciation == 'SECRETARIO_EXECUTIVO')
                                {{ __('Secretário Executivo') }}
                            @else
                                {{ __('Secretária Executiva') }}
                            @endif
                        @endif
                    </span>
                    <i class="fa-solid fa-angle-right ma-org-links__icon" aria-hidden="true"></i>
                </a>
            </li>
            <li>
                <a class="ma-org-links__item" href="{{ route('paginas.competencias-e-atribuicoes', $secretaria->slug) }}">
                    <span class="ma-org-links__text">{{ __('Competências e atribuições') }}</span>
                    <i class="fa-solid fa-angle-right ma-org-links__icon" aria-hidden="true"></i>
                </a>
            </li>
            <li>
                <a class="ma-org-links__item"
                    href="{{ \App\Support\StructurePublicUrls::faleConoscoUrl($secretaria) }}">
                    <span class="ma-org-links__text">{{ __('Fale conosco') }}</span>
                    <i class="fa-solid fa-angle-right ma-org-links__icon" aria-hidden="true"></i>
                </a>
            </li>
            @foreach ($links as $link)
                @if (\App\Support\StructurePublicUrls::isAdministrativeFaleConoscoTitulo($link->titulo ?? null))
                    @continue
                @endif
                <li>
                    <a class="ma-org-links__item" href="{{ url($link->link) }}" target="{{ $link->status }}">
                        <span class="ma-org-links__text">{{ $link->titulo }}</span>
                        <i class="fa-solid fa-angle-right ma-org-links__icon" aria-hidden="true"></i>
                    </a>
                </li>
            @endforeach
        </ul>
    </article>
@endif
