@model ProfileIndexModel
@{
    Layout = "_ColumnsOne";

    //title
    NopHtml.AddTitleParts(T("PageTitle.Profile").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-profile-page");
}
<div class="page profile-page">
    <div class="page-title panel-heading">
        <h1>@Model.ProfileTitle</h1>
    </div>
    <div class="page-body">
        @{
            var selectPostsTab = Model.ForumsEnabled && Model.PagingPosts ? ".tabs( 'option', 'active', 1 )" : "";
        }
        <script asp-location="Footer">
            $(function () {
                $("#tabs").tabs()@Html.Raw(selectPostsTab);
            });
        </script>
        <ul id="tabs" class="nav nav-tabs">
            <li class="active"><a href="#tabs-1" data-toggle="tab">@T("Profile.PersonalInfo")</a></li>
            @if (Model.ForumsEnabled)
            {
                <li><a href="#tabs-2" data-toggle="tab">@T("Profile.LatestPosts")</a></li>
            }
        </ul>
        <div class="tab-content">
            <div class="tab-pane active" id="tabs-1">
                @await Component.InvokeAsync(typeof(ProfileInfoViewComponent), new { customerProfileId = Model.CustomerProfileId })
            </div>
            @if (Model.ForumsEnabled)
            {
                <div class="tab-pane" id="tabs-2">
                    @await Component.InvokeAsync(typeof(ProfilePostsViewComponent), new { customerProfileId = Model.CustomerProfileId, pageNumber = Model.PostsPage })
                </div>
            }
        </div>
    </div>
</div>
