@php
    $waNumber = $waNumber ?? (App\Models\SiteSetting::where('key','whatsapp_number')->value('value') ?? '923001234567');
    $serviceName = $serviceName ?? 'Texora service';
    $packageName = $packageName ?? null;
    $startLabel = $startLabel ?? 'Start Now';
    $expertUrl = $expertUrl ?? route('consultation');
    $whatsappText = $whatsappText ?? 'Hi Texora, I need help with ' . $serviceName . ($packageName ? ' - ' . $packageName : '');
    $whatsappUrl = 'https://wa.me/' . preg_replace('/[^0-9]/', '', $waNumber) . '?text=' . urlencode($whatsappText);
@endphp

<div class="txp-actions">
    @if(!empty($startClick))
        <button type="button" class="txp-action-primary" @click.stop="{{ $startClick }}">
            {{ $startLabel }}
        </button>
    @else
        <a href="{{ $startUrl ?? route('services.index') }}" class="txp-action-primary" @click.stop>
            {{ $startLabel }}
        </a>
    @endif

    <div class="txp-action-row">
        <a href="{{ $expertUrl }}" class="txp-action-secondary" @click.stop>Talk to Expert</a>
        <a href="{{ $whatsappUrl }}" target="_blank" rel="noopener" class="txp-action-secondary txp-action-whatsapp" @click.stop>WhatsApp</a>
    </div>
</div>
