{{-- Interactive 1–5 star picker (internal workflow only). --}} @php $widgetId = $widgetId ?? 'mec-star-rating-widget'; $inputId = $inputId ?? 'workflow-star-rating-value'; $inputName = $inputName ?? 'workflow_star_rating'; $labelId = $labelId ?? 'mec-star-rating-label'; $existingRating = (int) ($existingRating ?? 0); if ($existingRating < 0 || $existingRating > 5) { $existingRating = 0; } $heading = $heading ?? __('Report quality rating'); $hint = $hint ?? __('Click a star to rate this report (1–5). Internal use only — not shown in the published report.'); $required = (bool) ($required ?? true); $wrapperClass = trim((string) ($wrapperClass ?? 'mec-star-rating')); $errorKey = $errorKey ?? 'workflow_star_rating'; @endphp

{{ $heading }}

@if ($hint !== '')

{{ $hint }}

@endif
@for ($star = 1; $star <= 5; $star++) @endfor

@if ($existingRating > 0) {{ __(':n of 5 stars', ['n' => $existingRating]) }} @else {{ __('Select a rating') }} @endif

@error($errorKey) {{ $message }} @enderror @once @endonce