protected function renderItems(array $items, $type, $sorted = true)
    {
        if ($sorted) {
            static::sortItems($items);
        }

        return array_map(function ($item) use ($type)
        {
            $asset = Arr::get($item, 'asset');

            //
            $mode = Arr::get($item, 'mode', 'default');

            if ($mode === 'inline') {
                $asset = sprintf("\n%s\n", trim($asset));
            }

            // The 'view' mode is a specialized 'inline'
            else if ($mode === 'view') {
                $mode = 'inline';

                $asset = $this->views->fetch($asset);
            }

            $template = Arr::get(static::$templates, "${mode}.${type}");

            return sprintf($template, $asset);

        }, $items);
    }