@php use App\Support\CatalogText; use Illuminate\Support\Str; @endphp {{-- Public catalogue, grouped by category and collapsible. Each section opens with wire:click (not Alpine) on purpose: a category's services are requested from the server when it opens. With 5,500 services in the catalogue, an accordion that already held everything inside would be a page that takes ten seconds to exist just to save one click. --}}
{{-- The network icon sprite doesn't live in the public layout, so the page that uses it brings it along. It goes INSIDE the component's root: a loose sibling turns the into Livewire's root and every wire:click below stops existing for the component. --}} @include('partials.social-icons')

{{ __('Services') }}

{{ __('Browse our catalogue by network and category.') }}

{{-- Search box + quick jump --}}
@if ($search !== '')

{{ trans_choice('{0}No category matches “:term”.|[1,*]:count categories match “:term”.', $categories->total(), ['count' => $categories->total(), 'term' => $search]) }}

@endif {{-- Category accordion --}}
@forelse ($categories as $category) @php $isOpen = in_array((int) $category->id, $openIds, true); $rows = $servicesByCategory[$category->id] ?? collect(); $catName = CatalogText::display($category->name); $net = ($category->platform?->slug && $category->platform->slug !== 'other') ? impulsa_net($category->platform->slug) : detect_network_from_name($catName); @endphp
@if ($isOpen)
@foreach ($rows as $svc) @php $svcName = CatalogText::display($svc->name); $svcData = \Illuminate\Support\Js::from([ 'id' => $svc->id, 'name' => $svcName, 'desc' => CatalogText::display($svc->description), 'time' => $svc->average_time, 'rate' => rate_money($svc->public_price ?? $svc->owner_price, $currency), 'min' => number_format($svc->min), 'max' => number_format($svc->max), 'category' => $catName, ]); @endphp @endforeach
{{ __('ID') }} {{ __('Service') }} {{ __('Rate / 1K') }} {{ __('Min') }} {{ __('Max') }}
{{ $svc->id }}
{{ $svcName }}
@if ($svc->refill){{ __('Refill') }}@endif @if ($svc->cancel){{ __('Cancel') }}@endif @if ($svc->dripfeed){{ __('Drip-feed') }}@endif @if ($svc->average_time){{ $svc->average_time }}@endif
{{ rate_money($svc->public_price ?? $svc->owner_price, $currency) }} {{ number_format($svc->min) }} {{ number_format($svc->max) }}
@if ($category->sellable_count > $rows->count())
@endif
@endif
@empty

{{ __('No services found') }}

{{ __('Try another search term or clear the category filter.') }}

@endforelse
@if ($categories->hasPages())
{{ $categories->links() }}
@endif {{-- Service detail card. Only closes with the X or Close: a click outside can't discard what the visitor was reading. --}}

{{ __('ID') }}
{{ __('Rate / 1K') }}
{{ __('Min') }}
{{ __('Max') }}
{{ __('Average time') }}

{{ __('No description provided for this service.') }}

@guest {{ __('Create account to order') }} @else {{ __('Order now') }} @endguest
@guest

{{ __('Ready to order? Create your account and start growing today.') }}

{{ __('Get started') }}
@endguest