{{-- Business-plan resellers: shortcut to import from their own provider(s). --}} @if ($ownProviders->isNotEmpty()) @if ($ownProviders->count() === 1) {{ __('Import services') }} @else {{ __('Import services') }} @endif @endif {{-- Collapses/expands all cards at once, same as the admin's. The wrapper spans are necessary: Lucide replaces the with , so x-show has to go on the parent span (which Lucide doesn't touch). --}} @unless ($defaultMargin) {{-- With no margin there's no business: the reseller would be reselling at cost. --}}
{{ __('You have no default margin yet, so every service sells at the owner cost and you earn nothing. Set one to start making a margin on the whole catalogue.') }}
@endunless @if ($categories->isNotEmpty()) @endif {{-- Summary: how many services across how many category groups --}}
{{ trans_choice(':count service|:count services', $matchedTotal, ['count' => number_format($matchedTotal)]) }} {{ __('in') }} {{ trans_choice(':count category|:count categories', $groups->total(), ['count' => number_format($groups->total())]) }}
{{-- ══ One collapsible card per category with its services underneath ══ --}} @forelse ($groups as $category) @php $rows = $grouped->get($category->id, collect()); $categoryHidden = in_array($category->id, $hiddenCategories, true); @endphp
{{-- Category header: name + how many match + collapse --}}
@if ($category->platform) @endif

{{ $category->name }}

{{ number_format($category->matched_count) }} @if ($categoryHidden) {{-- The category is turned off in the store: its services don't sell even if they have a price here. Saying so avoids the confusion of "it's active and doesn't show up". --}} {{ __('Hidden') }} @endif
@if (! $usesOwnerCatalog) {{-- Business resellers: admin-style table with provider info --}} @foreach ($rows->take($rowCap) as $service) @php $p = $priced[$service->id]; $isHidden = in_array($service->id, $hidden, true); $hasRule = in_array($service->id, $ruledIds, true); $typeLabel = match($service->service_type) { 'subscriptions' => 'Subscriptions', 'custom_comments' => 'Custom comments', 'custom_comments_package' => 'Cc Package', 'mentions_hashtags' => 'Mentions', 'package' => 'Package', 'comment_likes' => 'Comment likes', default => 'Default', }; @endphp @endforeach @if ($rows->count() > $rowCap) @endif
{{ __('Service') }} {{ __('Provider') }} {{ __('Type') }} {{ __('Rate / 1000') }} {{ __('Min / Max') }} {{ __('View') }} {{ __('Status') }} {{ __('Action') }}
{{ \Illuminate\Support\Str::limit($service->name, 55) }}
ID {{ $service->api_service_id ?: $service->id }}
{{ $service->provider?->name ?? '—' }}
{{ $service->api_service_id ?: '' }}
{{ $typeLabel }}
{{ rate_money($p['client'], $currency) }}
{{ rate_money($p['owner'], $currency) }}
{{ number_format($service->min) }} / {{ number_format($service->max) }} @if ($service->description || $service->average_time) @else — @endif
{{ __('Showing :shown of :total services — open this category to page through the rest.', ['shown' => number_format($rowCap), 'total' => number_format($category->matched_count)]) }} {{ __('Open this category') }}
@else {{-- Free/Pro resellers: pricing-focused table (owner cost · your price · margin) --}} @foreach ($rows->take($rowCap) as $service) @php $p = $priced[$service->id]; $isHidden = in_array($service->id, $hidden, true); $hasRule = in_array($service->id, $ruledIds, true); @endphp @endforeach @if ($rows->count() > $rowCap) @endif
{{ __('Service') }} {{ __('Capabilities') }} {{ __('Owner cost') }} {{ __('Your price') }} {{ __('Margin') }} {{ __('On storefront') }} {{ __('Action') }}
{{ \Illuminate\Support\Str::limit($service->name, 60) }}
ID {{ $service->id }} · {{ number_format($service->min) }} / {{ number_format($service->max) }}
@if ($service->refill){{ __('Refill') }}@endif @if ($service->cancel){{ __('Cancel') }}@endif @if ($service->dripfeed){{ __('Drip-feed') }}@endif {{ $service->price_type === 'package' ? __('Flat') : __('per 1000') }}
{{ rate_money($p['owner'], $currency) }} @if ($hasRule)
{{ __('custom') }}
@endif
{{ rate_money($p['margin'], $currency) }}
{{ __('Showing :shown of :total services — open this category to page through the rest.', ['shown' => number_format($rowCap), 'total' => number_format($category->matched_count)]) }} {{ __('Open this category') }}
@endif
@empty
@if (! $usesOwnerCatalog)

{{ __('No services imported yet') }}

{{ __('Go to My Providers, connect your upstream SMM provider, then use Manage Catalogue to import the services you want to sell.') }}

{{ __('Go to My Providers') }} @else

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

{{ __('Adjust the filters — or the owner has not published services for this network yet.') }}

@endif
@endforelse {{-- Pagination BY GROUPS: paginates the cards, never the full list --}} @if ($groups->hasPages())
{{ $groups->links() }}
@endif {{-- Sale price for ONE service --}}
{{ \Illuminate\Support\Str::limit($priceServiceName, 60) }}
{{ __('Your owner cost') }} {{ rate_money($priceOwnerCost, $currency) }}
@error('priceValue')

{{ $message }}

@enderror

{{ $priceMode === 'price' ? __('We store it as the equivalent fixed margin, so an owner price change still carries through.') : __('This rule beats your category and default margins for this service only.') }}

{{-- Default margin for the whole catalogue --}}

{{ __('Applied to every service that has no price of its own.') }}

@error('defaultMarginValue')

{{ $message }}

@enderror