@props(['classe' => ''])

@php
    $dev = $site->get('dev_nome');
    $siteDev = $site->get('dev_site');
    $texto = $site->get('dev_creditos');
    $suporte = $site->get('suporte_email');
    $telefone = $site->get('suporte_telefone');
@endphp

@if ($dev || $texto || $suporte || $telefone)
    <p {{ $attributes->merge(['class' => 'flex flex-wrap items-center gap-x-2 gap-y-1 '.$classe]) }}>
        @if ($texto)
            <span>{{ $texto }}</span>
        @endif

        @if ($dev)
            <span>
                Desenvolvido por
                @if ($siteDev)
                    <a href="{{ $siteDev }}" target="_blank" rel="noopener noreferrer"
                       class="font-medium underline underline-offset-2 hover:text-slate-600">{{ $dev }}</a>
                @else
                    <span class="font-medium">{{ $dev }}</span>
                @endif
            </span>
        @endif

        @if ($suporte)
            <span aria-hidden="true">·</span>
            <a href="mailto:{{ $suporte }}" class="underline underline-offset-2 hover:text-slate-600">{{ $suporte }}</a>
        @endif

        @if ($telefone)
            <span aria-hidden="true">·</span>
            <span class="tabular">{{ $telefone }}</span>
        @endif
    </p>
@endif
