{{-- ══ Header: provider + back link + running counter ══ --}} {{ __('Back to providers') }} {{-- Summary strip: how much of the upstream catalogue is imported. --}}
{{ __('Imported') }}
{{ number_format($importedCount) }} {{ __('of') }} {{ number_format($catalogueSize) }}
@if ($catalogueSize === 0) {{ __('Provider unreachable or empty — try Refresh upstream') }} @endif
{{-- Markup % for this import session (persisted as the provider default). --}}
%
{{-- Newly imported services enter active or hidden. --}}

{{ __('“Your price” below is the provider rate plus this markup. Saved as the provider default.') }}

{{-- ══ Tabs ══ --}}
{{-- ════════════════════════════ IMPORT TAB ════════════════════════════ --}} @if ($tab === 'import') {{-- Filters --}}
{{-- Provider category typeahead (hundreds of categories). --}}
@if ($categoryFilter !== '') @else
@forelse ($categoryOptions as $name) @empty
{{ $categorySearch === '' ? __('Type to search categories…') : __('No categories match.') }}
@endforelse
@endif
{{-- Bulk action bar --}}
{{ __('selected') }}
@if ($categoryFilter !== '') @endif
{{-- Upstream catalogue table (paginated in memory) --}}

{{ $categoryFilter !== '' ? $categoryFilter : __('Upstream catalogue') }}

{{ trans_choice(':count service|:count services', $importTotal, ['count' => number_format($importTotal)]) }}
@forelse ($importRows as $dto) @php $sid = (string) $dto->serviceId; $imp = $importedMap[$sid] ?? null; @endphp @empty @endforelse
{{ __('Service') }} {{ __('Category') }} {{ __('Type') }} {{ __('Rate / 1000') }} {{ __('Your price') }} {{ __('Min / Max') }} {{ __('State') }} {{ __('Action') }}
@if ($imp === null) @else @endif
{{ \Illuminate\Support\Str::limit($dto->name, 52) }}
{{ __('Provider ID') }} {{ $sid }}
{{ \Illuminate\Support\Str::limit($dto->category, 32) }} {{ ucfirst($dto->type) }} {{ money($dto->rate, $providerCurrency) }} {{ money($yourPrices[$sid] ?? $dto->rate, $providerCurrency) }} {{ number_format((int) $dto->min) }} – {{ number_format((int) $dto->max) }} @if ($imp === null) {{ __('Not imported') }} @elseif ($imp['status']) {{ __('Imported') }} @else {{ __('Hidden') }} @endif @if ($imp === null) @else
@endif
{{-- In-memory pagination --}} @if ($importPages > 1)
{{ __('Page :p of :t', ['p' => $page, 't' => $importPages]) }}
@endif
@endif {{-- ═══════════════════════════ IMPORTED TAB ═══════════════════════════ --}} @if ($tab === 'imported') {{-- Filters --}}
@if ($selectedICategoryName) @else
@forelse ($iCategoryOptions as $opt) @empty
{{ $iCategorySearch === '' ? __('Type to search categories…') : __('No categories match.') }}
@endforelse
@endif
{{-- Bulk bar --}}
{{ __('selected') }}
{{-- Imported services table --}}

{{ $selectedICategoryName ?: __('Imported services') }}

{{ trans_choice(':count service|:count services', $importedTotal, ['count' => number_format($importedTotal)]) }}
@forelse ($importedRows as $s) @empty @endforelse
{{ __('Service') }} {{ __('Category') }} {{ __('Type') }} {{ __('Rate / 1000') }} {{ __('Min / Max') }} {{ __('Status') }} {{ __('Action') }}
{{ \Illuminate\Support\Str::limit($s->name, 52) }}
{{ __('Provider ID') }} {{ $s->api_service_id }}
{{ $s->category?->name }} {{ __(ucfirst(str_replace('_', ' ', $s->service_type))) }} {{ money($s->owner_price, $providerCurrency) }} {{ number_format($s->min) }} – {{ number_format($s->max) }}
@if ($importedPages > 1)
{{ __('Page :p of :t', ['p' => $iPage, 't' => $importedPages]) }}
@endif
@endif {{-- ══ Bulk Import Service modal (the reference panel's "Import Services" parity) ══ --}} @php // Limit dropdown: every multiple of 25 up to 1000, then "All" — the exact // steps the reference panel builds in provider/views/bulk_services.php. $bulkLimits = []; for ($i = 25; $i <= 1000; $i += 25) { $bulkLimits[(string) $i] = number_format($i); } @endphp

{{ __('Import upstream services and their categories from') }} {{ $providerName }}.

{{-- Price percentage increase --}}
%

{{ __('Added over the provider cost. Auto-rounded to 2 decimals.') }}

{{-- Limit --}}

{{ __('How many not-yet-imported services to add (in provider order).') }}

{{-- Convert currency --}} {{-- Note --}}

{{ __('The system imports services and categories from the provider applying the percentage increase. Already-imported services are skipped and never counted against the limit.') }}