@props([ 'selectedCategories' => null, 'maxDepth' => 3, 'type' => 'common', 'title' => '카테고리 연동 설정', 'variant' => 'primary' // 디자인 분기 옵션: 'primary'(기존 카드형) / 'secondary'(슬림 인라인형) ]) @php $selectedCategories = $selectedCategories ?? collect(); @endphp @if($variant === 'secondary')
최대 {{ $maxDepth }}단계
선택된 카테고리가 없습니다. 우측 '카테고리 검색' 버튼을 눌러 지정해주세요. @if($selectedCategories->isNotEmpty()) @foreach($selectedCategories as $category)
{{ $category->parent ? ($category->parent->parent ? $category->parent->parent->name . ' > ' . $category->parent->name . ' > ' : $category->parent->name . ' > ') : '' }} {{ $category->name }}
@endforeach @endif
@else
{{ $title }} {{ strtoupper($type) }} 전용 (최대 {{ $maxDepth }}단계)
선택된 카테고리가 없습니다. 하단 버튼을 눌러 카테고리를 지정해주세요. @if($selectedCategories->isNotEmpty()) @foreach($selectedCategories as $category)
{{ $category->parent ? ($category->parent->parent ? $category->parent->parent->name . ' > ' . $category->parent->name . ' > ' : $category->parent->name . ' > ') : '' }} {{ $category->name }}
@endforeach @endif
@endif