@props(['name', 'value', 'duration' => '', 'isMoney' => false])
merge(['class' => 'w-1/3 px-3 py-2 text-white rounded-lg bg-blue-700']) }}>
Total {{ $name }} {{ str_replace('_', ' ', $duration) }}
{{ $isMoney ? '₦' : '' }} $negativeChange, 'text-gray-500' => $neutralChange, 'text-green-600' => $name == 'profit' or $positiveChange, ])> {{ $value ?? $slot }}
@if ($name == 'sales')
{{ author()->totalBookSold($duration) }} books sold
@endif