public function indexSSR(BuyerReturnDataTableSearch $request): JsonResponse 	{ 		$isReclamation = $request->boolean('is_reclamation');  		$orders = BuyerReturn::includes()->byType($isReclamation);  		$status = $request->status ?? []; 		$search = $request->search['value'] ?? null;  		return DataTables::eloquent($orders) 		->order(static function (object $query) use ($request): void { 			$order_array = $request->get('order') ?? []; 			$columns_array = $request->columns;  			if (filled($order_array)) { 				foreach (array_column($order_array, 'dir', 'column') as $column_index => $order_direction) { 					$query->orderBy($columns_array[$column_index]['name'], $order_direction); 				} 			} else { 				$query->latest(); 			} 		}) 		->filter(static function ($query) use ($status, $search): void { 			if ($status !== []) { 				$query->filterStatuses($status); 			}  			if ($search) { 				$query->search($search); 			} 		}) 		->addColumn('author', static fn (BuyerReturn $row): string => $row->getAuthorName()) 		->addColumn('repair_service_supplier', static fn (BuyerReturn $row): ?string => $isReclamation ? $row->supplier : $row->getRepairServiceName()) 		->addColumn('buyer', static fn (BuyerReturn $row): string => $row->getBuyerName()) 		->addColumn('serial_number', static fn (BuyerReturn $row): string => $row->item->serial_number) 		->addColumn('status', static fn (BuyerReturn $row): string => $row->getLastStatusName()) 		->addColumn('edit', static fn (BuyerReturn $row): View => view('layouts.edit_button', ['path' => [$isReclamation ? 'reclamations.edit' : 'services.edit' => $row->getKey()]])) 		->addColumn('created_at', static fn (BuyerReturn $row): string => '<td data-order="' . formatTimestamp($row->created_at, 'U') . '">' . formatLocalTimestamp($row->created_at) . '</td>') 		->addColumn('checkbox', static fn (BuyerReturn $row): View => view('layouts.option_buttons', ['value' => $row->getKey()])) 		->rawColumns([ 			'edit', 			'created_at', 			'checkbox', 		]) 		->toJson(); 	}