{{ __('adminhub::partials.discounts.limitations.heading') }}

{{ __('adminhub::partials.discounts.limitations.by_collection') }}

@livewire('hub.components.collection-search', [ 'existing' => $selectedCollections->pluck('id'), ])
@foreach ($selectedCollections as $index => $collection)
@if ($collection['thumbnail']) @endif
{{ $collection['group_name'] }} @if (count($collection['breadcrumb'])) {{ collect($collection['breadcrumb'])->first() }} @endif @if (count($collection['breadcrumb']) > 1) ... @endif {{ $collection['name'] }}
{{ __('adminhub::partials.products.collections.view_collection') }} {{ __('adminhub::global.remove') }}
@endforeach

{{ __('adminhub::partials.discounts.limitations.by_brand') }}

@livewire('hub.components.brand-search', [ 'existing' => $selectedBrands->pluck('id'), ])
@foreach ($selectedBrands as $index => $brand)
{{ $brand['name'] }}
{{ __('adminhub::partials.discounts.limitations.view_brand') }} {{ __('adminhub::global.remove') }}
@endforeach

{{ __('adminhub::partials.discounts.limitations.by_product') }}

@livewire('hub.components.product-search', [ 'existing' => $selectedProducts->map(fn ($product) => ['id' => $product['id']]), 'ref' => 'discount-limitations', ])
@foreach ($selectedProducts as $index => $product)
{{ $product['name'] }}
{{ __('adminhub::partials.discounts.limitations.view_product') }} {{ __('adminhub::global.remove') }}
@endforeach