'در انتظار تأیید', self::Approved => 'تأیید شده - در انتظار پرداخت', self::PendingPayment => 'در انتظار پرداخت', self::Cancelled => 'لغو شده', self::Processed => 'در حال پردازش', self::PickedUp => 'تحویل به حمل‌کننده', self::InTransit => 'در حال حمل', self::OutForDelivery => 'آماده تحویل', self::Failed => 'تحویل ناموفق', self::Delivered => 'تحویل شده', self::Returned => 'برگشتی', self::Archived => 'آرشیو', }; } public function color(): string { return match ($this) { self::PendingApproval => 'warning', self::Approved => 'info', self::PendingPayment => 'warning', self::Cancelled => 'danger', self::Processed => 'gray', self::PickedUp => 'info', self::InTransit => 'primary', self::OutForDelivery => 'success', self::Failed => 'danger', self::Delivered => 'success', self::Returned => 'warning', self::Archived => 'gray', }; } public function isPaid(): bool { return !in_array($this, [ self::PendingApproval, self::PendingPayment, ]); } public function canBeCancelledByCustomer(): bool { return in_array($this, [ self::PendingApproval, self::PendingPayment, ]); } public function isApproved(): bool { return $this === self::Approved; } public function isPendingApproval(): bool { return $this === self::PendingApproval; } public function canBeApprovedByStaff(): bool { return $this === self::PendingApproval; } public function canBePaid(): bool { return $this === self::Approved; } }