using System.Collections.Generic;
using System.Threading.Tasks;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Strings;
namespace Umbraco.Cms.Core.Templates
{
///
/// Methods used to render umbraco components as HTML in templates
///
public interface IUmbracoComponentRenderer
{
///
/// Renders the template for the specified pageId and an optional altTemplateId
///
/// The content id
/// If not specified, will use the template assigned to the node
Task RenderTemplateAsync(int contentId, int? altTemplateId = null);
///
/// Renders the macro with the specified alias.
///
/// The content id
/// The alias.
Task RenderMacroAsync(int contentId, string alias);
///
/// Renders the macro with the specified alias, passing in the specified parameters.
///
/// The content id
/// The alias.
/// The parameters.
Task RenderMacroAsync(int contentId, string alias, object parameters);
///
/// Renders the macro with the specified alias, passing in the specified parameters.
///
/// The content id
/// The alias.
/// The parameters.
Task RenderMacroAsync(int contentId, string alias, IDictionary parameters);
///
/// Renders the macro with the specified alias, passing in the specified parameters.
///
/// An IPublishedContent to use for the context for the macro rendering
/// The alias.
/// The parameters.
/// A raw HTML string of the macro output
///
/// Currently only used when the node is unpublished and unable to get the contentId item from the
/// content cache as its unpublished. This deals with taking in a preview/draft version of the content node
///
Task RenderMacroForContent(IPublishedContent content, string alias, IDictionary parameters);
}
}