@props([ 'label' => '', 'current' => 0, 'total' => null, 'color' => 'primary', 'icon' => null, 'showPercent' => true, 'animated' => true, ]) @php $percent = $total && $total > 0 ? min(100, ($current / $total) * 100) : 0; $remaining = $total ? max(0, $total - $current) : null; @endphp
merge(['class' => 'order-progress-widget']) }} @if($animated) x-data="{ show: false, currentWidth: 0 }" x-init="setTimeout(() => { show = true; currentWidth = {{ $percent }}; }, 100)" x-show="show" x-transition @endif >
@if($icon) @endif {{ $label }}
{{ number_format($current) }} @if($total) / {{ number_format($total) }} @endif
@if($showPercent) {{ number_format($percent, 1) }}% @else @endif @if($remaining !== null) {{ __('Restant') }}: {{ number_format($remaining) }} @endif