@php $kindLabels = $kindLabels ?? []; $simpleMedia = $simpleMedia ?? false; $visibleFields = $visibleFields ?? ($simpleMedia ? ['title', 'status', 'description'] : ['kind', 'title', 'subtitle', 'status', 'description', 'video']); $singleKind = count($mediaKinds) === 1 ? $mediaKinds[0] : null; $sectionLabel = $sectionLabel ?? 'Project Media'; $videoOnly = $videoOnly ?? false; $addRowOnly = $addRowOnly ?? false; $addRowLabel = $addRowLabel ?? 'Add Item'; $fieldPlaceholders = array_merge([ 'title' => 'Title', 'subtitle' => 'Subtitle', 'description' => 'Description', 'video' => 'Video URL', ], $fieldPlaceholders ?? []); $descriptionEditor = $descriptionEditor ?? false; $hideRemove = $hideRemove ?? false; $dualImage = $dualImage ?? false; $sortable = $sortable ?? false; $show = fn ($field) => in_array($field, $visibleFields, true); $rowClass = trim(($dualImage ? 'dual-thumbs' : '') . ($sortable ? ' has-drag' : '') . ($videoOnly ? ' video-only' : '')); @endphp {{-- Field values are collected into media_json on submit (avoids PHP max_input_vars truncation). --}}