@php $slots = old('pack_slots', $slots); $slots[] = ['mode' => 'fixed', 'product_ids' => []]; @endphp
@include('admin/shared/textarea', [ 'name' => 'pack_panel_content', 'label' => __('pack::lang.admin.panel_content'), 'value' => old('pack_panel_content', $product->getMetadata('pack_panel_content') ?: __('pack::lang.panel.default')), 'rows' => 5, 'help' => __('pack::lang.admin.panel_content_help'), ])

{{ __('pack::lang.admin.config_help') }}

@foreach($slots as $index => $slot)
@include('admin/shared/select', [ 'name' => 'pack_slots['.$index.'][mode]', 'label' => __('pack::lang.admin.slot_mode'), 'options' => [ 'fixed' => __('pack::lang.admin.slot_modes.fixed'), 'choice' => __('pack::lang.admin.slot_modes.choice'), ], 'value' => $slot['mode'] ?? 'fixed', ])
@include('admin/shared/search-select-multiple', [ 'name' => 'pack_slots['.$index.'][product_ids][]', 'label' => __('global.products'), 'options' => $products, 'value' => array_map('intval', $slot['product_ids'] ?? []), ])
@endforeach