protected function extractVariables($content)
    {
        preg_match_all('/\[\[(.*?)\]\]/', $content, $matches);

        if (!isset($matches[0], $matches[1])) {
            return [];
        }
        $return        = [];
        $notifications = \Antares\Foundation\Notification::getInstance()->all();

        foreach ($matches[1] as $index => $match) {
            if (!str_contains($match, '::')) {
                continue;
            }
            list($component, $var) = explode('::', trim($match));
            $name = $this->findExtensionName($component);
            if (!$name) {
                continue;
            }
            $variables                   = $notifications[$name]['variables'];
            $return[$matches[0][$index]] = $this->resolveValue($var, $variables);
        }
        return $return;
    }