public function pools(Request $request): array
    {
        if ($name = $request->query('name')) {
            if (!App::hasPool($name)) {
                return [];
            }

            /** @var PoolConfigInterface $poolConfig */
            $poolConfig = App::getPool($name)->getPoolConfig();

            return $poolConfig->toArray();
        }

        return PoolCollector::getCollector();
    }