@using Humanizer
@model IEnumerable<SharedLibraryCore.Dtos.Meta.Responses.InformationResponse>
@{
    var informationMeta = Model
        .Where(meta => meta.Type == SharedLibraryCore.Interfaces.MetaType.Information)
        .OrderBy(meta => meta.Order)
        .Select((meta, i) => new { index = i, meta })
        .GroupBy(meta => meta.index / 5);
}

<div class="d-flex flex-wrap">
@foreach (var metaColumn in informationMeta)
{
  <!--  <div class="mr-20"> -->
        @foreach (var meta in metaColumn)
        {
            <div class="m-md-5 p-15 w-half rounded bg-very-dark-dm bg-light-ex-lm profile-meta-entry font-size-12  w-md-100 w-lg-150" data-toggle="@(!string.IsNullOrEmpty(meta.meta.ToolTipText) ? "tooltip" : "")" data-title="@meta.meta.ToolTipText" data-placement="bottom">

                @{var results = Utilities.SplitTranslationTokens(meta.meta.Key);}

                @if (results.Any(result => result.IsInterpolation))
                {
                    foreach (var result in results)
                    {
                        if (result.IsInterpolation)
                        {
                            <div class="profile-meta-value text-primary font-size-14"><color-code value="@meta.meta.Value"></color-code></div>
                        }

                        else
                        {
                            <span class="profile-meta-title text-muted font-size-12">@result.MatchValue.Titleize()</span>
                        }
                    }
                }

                else
                {
                    <div class="profile-meta-value text-primary font-size-14"><color-code value="@meta.meta.Value"></color-code></div>
                    <div class="profile-meta-title text-muted font-size-12">@meta.meta.Key.Titleize()</div>
                }
            </div>
        }
}
</div>
