@using Microsoft.Extensions.DependencyInjection
@inject IConfiguration Configuration
@model List<AS1024.CommunityDocumentationPage.Models.Result>
@{
    ViewData["Title"] = "BGP Communities";
}

<p>This site contains BGP communities for @("AS" + Configuration["ASN"]). Please note that these communities are subject to change at a moment's notice. We do not strip communities on received routes or on routes sent to peers and upstreams, but we cannot guarantee that the communities will be preserved by the upstream or peers. If you have any questions or need support, please reach out to <a href="mailto:@Configuration["NOCEmail"]">@Configuration["NOCEmail"].</a></p>
    
    
<p>The communities are as follows:</p>
<div class="table-responsive">
    <table class="table table-hover">
        <thead>
            <tr>
                <th scope="col">Community Tag</th>
                <th scope="col">Description</th>
                <th scope="col">Community Type</th>
            </tr>
        </thead>
        @foreach (var item in Model) {
        <tr>
            <td scope="row">@item.Name</td>
            <td scope="row">@item.Description</td>
            <td scope="row">
                @foreach (var tags in item.Tags) {
                    <div class="d-inline-flex p-2 text-white" style="background-color:#@tags.color">@tags.display</div>
                }
            </td>
        </tr>
        }
    </table>
</div>