@using SharedLibraryCore.Dtos.Meta.Responses
@using Humanizer
@model IList<MessageResponse>
@{
    Layout = null;
}

<div class="client-message-context mt-10 mb-10">
    <h5 class="rounded-top bg-primary text-light mb-0 p-10 pt-5 pb-5">@Model.First().When.Humanize()</h5>
    <div class="bg-dark-dm bg-light-lm p-10 pr-20 rounded-bottom">
        @foreach (var message in Model)
        {
            <span>
                <color-code value="@message.ClientName" allow="@ViewBag.EnableColorCodes"></color-code>
            </span>
            <span>
                &mdash;
                <span class="@(message.IsQuickMessage ? "font-italic" : "") text-light-dm text-dark-lm">
                    <color-code value="@(message.IsHidden && !ViewBag.Authorized ? message.HiddenMessage : message.Message)" 
                                allow="@ViewBag.EnableColorCodes"></color-code>
                </span>
            </span>
            <br />
        }
    </div>
</div>
