@using SharedLibraryCore.Dtos.Meta.Responses
@model UpdatedAliasResponse

@if (TempData["ShowMetaHeader"] as bool? ?? false)
{
    <partial name="./_MetaHeader.cshtml" for="@Model.When"/>
}

@foreach (var token in Utilities.SplitTranslationTokens("WEBFRONT_PROFILE_META_CONNECT_ALIAS"))
{
    if (token.IsInterpolation)
    {
        switch (token.MatchValue)
        {
            case "action":
                <span class="text-secondary">@token.TranslationValue</span>
                break;
            case "alias":
                <span class="text-light-dm text-dark-lm">
                    <color-code value="@Model.Name"></color-code>
                    <has-permission entity="ClientIPAddress" required-permission="Read">
                        [@Model.IPAddress]
                    </has-permission>
                </span>
                break;
        }
    }

    else
    {
        <span class="text-muted">@token.MatchValue</span>
    }
}
