@php $state = $getState(); if ($state instanceof \Illuminate\Support\Collection) { $state = $state->all(); } $state = \Illuminate\Support\Arr::wrap($state); $limit = $getLimit(); $limitedState = array_slice($state, 0, $limit); $isCircular = $isCircular(); $isSquare = $isSquare(); $isStacked = $isStacked(); $overlap = $isStacked ? ($getOverlap() ?? 2) : null; $ring = $isStacked ? ($getRing() ?? 2) : null; $height = $getHeight() ?? ($isStacked ? '2rem' : '2.5rem'); $width = $getWidth() ?? (($isCircular || $isSquare) ? $height : null); $stateCount = count($state); $limitedStateCount = count($limitedState); $defaultImageUrl = $getDefaultImageUrl(); if ((! $limitedStateCount) && filled($defaultImageUrl)) { $limitedState = [null]; $limitedStateCount = 1; } $ringClasses = \Illuminate\Support\Arr::toCssClasses([ 'ring-white dark:ring-gray-900', match ($ring) { 0 => null, 1 => 'ring-1', 2 => 'ring-2', 3 => 'ring', 4 => 'ring-4', default => $ring, }, ]); $hasLimitedRemainingText = $hasLimitedRemainingText() && ($limitedStateCount < $stateCount); $isLimitedRemainingTextSeparate = $isLimitedRemainingTextSeparate(); $limitedRemainingTextSizeClasses = match ($getLimitedRemainingTextSize()) { 'xs' => 'text-xs', 'sm', null => 'text-sm', 'base', 'md' => 'text-base', 'lg' => 'text-lg', default => $size, }; @endphp