private function detectAction(string $className, array $variables = []): string
    {
        $action =
            // 1. Action name in line with class name eg. MyApp\Index:test - alias for `action_test`
            $this->extractActionFromClass($className)
            ?? (
                // 2. If action name in variables (we need first item)
                $variables['action'][0]
                // 3. Default action is index
                ?? self::DEFAULT_ACTION
            );

        return 'action_' . $action;
    }