@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
    var parameters = Model.GetDocumentList(CodeAnalysisKeys.Parameters);
    var paramComments = Model.GetList<ReferenceComment>(CodeAnalysisKeys.Params);
    if (parameters?.Count > 0)
    {
        <h3>Parameters</h3>
        <div class="doc-summary">
        <div>
            <dl>
                @foreach (var parameter in parameters)
                {
                    <div>
                        <dt>
                            @Context.GetTypeLink(parameter.GetDocument(CodeAnalysisKeys.Type)) <span class="identifier">@parameter.GetString(CodeAnalysisKeys.Name)</span>
                        </dt>
                        <dd>@Html.Raw(paramComments?.Where(x => x.Name.Equals(parameter.GetString(CodeAnalysisKeys.Name))).Select(x => x.Html).FirstOrDefault()) </dd>
                    </div>
                }
            </dl>
        </div>
        </div>
    }
}