@props([ 'status' => 'draft', // draft, posted, voided 'createdBy' => 'مدير النظام', 'createdAt' => null, 'postedBy' => null, 'postedAt' => null, 'printCount' => 0, ]) @php $isOriginal = ($status === 'posted' && $printCount <= 1); $statusText = match($status) { 'posted' => ($isOriginal ? 'مستند مرحّل معتمد (الأصل)' : "مستند مرحّل معتمد (نسخة مطبوعة {$printCount})"), 'voided' => 'مستند ملغي ومعكوس (Voided)', default => 'مسودة قيد الإدخال (لا أثر محاسبي)', }; $statusColor = match($status) { 'posted' => 'text-[#42B72A] bg-[#EBF7EE] border-[#42B72A]', 'voided' => 'text-[#FA383E] bg-[#FDE8E8] border-[#FA383E]', default => 'text-[#1877F2] bg-[#E7F3FF] border-[#1877F2]', }; @endphp