public function message($title, $text = null)
    {
        if (!in_array($this->type, ['success', 'error', 'info', 'warning'])) {
            return '';
        }
        $container = $this->assetFactory->container(self::position);
        $type      = $this->resolveType();
        return $container->inlineScript('swal-message', $this->inline($type, $title, $text));
    }