
@if(!empty($clientActions) && $service->status === 'active')
    <div class="card mb-3">
        <div class="card-header">
            <h5 class="card-title mb-0">
                <i class="fas fa-tools me-2"></i>{{ __('store.service_module_actions') }}
            </h5>
        </div>
        <div class="card-body">
            <div class="d-grid gap-2">
                @foreach($clientActions as $actionKey => $actionConfig)
                    @if($actionConfig['enabled'])
                        <a href="{{ route('store.auth.services.action.show', [$service->id, $actionKey]) }}"
                           class="btn {{ $actionConfig['class'] ?? 'btn-outline-primary' }} {{ isset($currentAction) && $currentAction === $actionKey ? 'active' : '' }}">
                            <i class="{{ $actionConfig['icon'] ?? 'fas fa-cog' }} me-2"></i>{{ $actionConfig['label'] }}
                        </a>
                    @endif
                @endforeach
            </div>
        </div>
    </div>
@endif


<div class="card mb-3">
    <div class="card-header">
        <h6 class="card-title mb-0">
            <i class="fas fa-info-circle me-2"></i>{{ __('store.service_information') }}
        </h6>
    </div>
    <div class="card-body">
        <div class="mb-2">
            <small class="text-muted">{{ __('store.service_service_id') }}:</small>
            <div><strong>#{{ $service->id }}</strong></div>
        </div>
        <div class="mb-2">
            <small class="text-muted">{{ __('store.service_product_name') }}:</small>
            <div>{{ $service->product->name ?? __('store.service_unknown_product') }}</div>
        </div>
        @if($service->domain)
            <div class="mb-2">
                <small class="text-muted">{{ __('store.service_domain') }}:</small>
                <div><code>{{ $service->domain }}</code></div>
            </div>
        @endif
        <div class="mb-2">
            <small class="text-muted">{{ __('store.service_status') }}:</small>
            <div>
                <span class="badge bg-{{ $service->status === 'active' ? 'success' : ($service->status === 'pending' ? 'warning' : 'secondary') }}">
                    {{ ucfirst($service->status) }}
                </span>
            </div>
        </div>
        @if($service->username)
            <div class="mb-0">
                <small class="text-muted">{{ __('store.service_username') }}:</small>
                <div><code>{{ $service->username }}</code></div>
            </div>
        @endif
    </div>
</div>


<div class="card">
    <div class="card-header">
        <h6 class="card-title mb-0">
            <i class="fas fa-compass me-2"></i>{{ __('store.quick_navigation') }}
        </h6>
    </div>
    <div class="card-body">
        <div class="d-grid gap-2">
            <a href="{{ route('store.auth.services.details', $service->id) }}" class="btn btn-outline-secondary btn-sm">
                <i class="fas fa-arrow-left me-2"></i>{{ __('store.back_to_details') }}
            </a>
            <a href="{{ route('store.auth.services') }}" class="btn btn-outline-secondary btn-sm">
                <i class="fas fa-list me-2"></i>{{ __('store.all_services') }}
            </a>
            <a href="{{ route('store.auth.dashboard') }}" class="btn btn-outline-secondary btn-sm">
                <i class="fas fa-home me-2"></i>{{ __('store.clientarea_nav_dashboard') }}
            </a>
        </div>
    </div>
</div>
