protected function fillContent($content)
    {
        preg_match_all('/\[\[(.*?)\]\]/', $content, $matches);
        if (!isset($matches[0]) or ! isset($matches[1])) {
            return $content;
        }
        $notifications = \Antares\Foundation\Notification::getInstance()->all();

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

            $variables = isset($notifications[$name]['variables']) ? $notifications[$name]['variables'] : [];
            event('notifications:notification.variables', [&$variables]);
            $value     = $this->resolveValue($var, $variables);

            if (is_array($value)) {
                $value = $this->getDefaultNotificationForList($value)->render();
            }

            $content = str_replace($matches[0][$index], $value, $content);
        }
        return $content;
    }