@props([ 'name' => 'marketing', // 슬롯 키 (기본값: marketing) 'label' => '마케팅 갤러리 이미지 관리', // 헤더 텍스트 'model' => null, // $shop ?? null 또는 $program ?? null 'maxCount' => 30, // 최대 등록 상한선 (기본값: 30장) 'badgeText' => '최대 30장 등록 가능', // 배지 텍스트 'buttonText' => '미디어 보관함에서 선택/업로드' // 버튼 텍스트 ]) @php $slotKey = $name; $previewContainerId = "{$slotKey}-gallery-preview"; $hiddenContainerId = "{$slotKey}-hidden-inputs"; // 1. 모델의 다형성 피벗에서 해당 슬롯의 기존 이미지 목록 추출 $existingImages = collect(); if ($model && method_exists($model, 'getSlotImages')) { $existingImages = $model->getSlotImages($slotKey); } @endphp