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

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

<span class="client-message" data-serverid="@Model.ServerId" data-when="@Model.When.ToFileTimeUtc()">
    <span data-title="@ViewBag.Localization["WEBFRONT_META_TOOLTIP_CONTEXT"]" data-toggle="tooltip" data-placement="right">
        <span class="oi oi-chevron-right align-middle client-message-prefix" style="font-size: 0.75rem; margin-top: -0.256rem"></span>
    </span> 
    <span class="text-muted @(Model.IsQuickMessage ? "font-weight-bold" : "")">
        @if (!Model.SentIngame)
        {
            <span>[<span class="text-primary">@ViewBag.Localization["WEBFRONT_PROFILE_MESSAGE_EXTERNAL"]</span>]</span>
        }

        @if (Model.IsHidden && !ViewBag.Authorized)
        {
            <color-code value="@Utilities.FormatExt(ViewBag.Localization["WEBFRONT_CLIENT_META_CHAT_HIDDEN"], Model.HiddenMessage)"></color-code>
        }

        else
        {
            <color-code value="@Model.Message"></color-code>
        }
    </span>
</span>
