<?php

$profile_links = [
    [
        "page_id" => "profile_home",
        "text" => "Profile",
        "link" => ""
    ],
    [
        "page_id" => "profile_mail",
        "text" => "Mail",
        "link" => "mail"
    ],
    [
        "page_id" => "profile_files",
        "text" => "Files",
        "link" => "files"
    ],
    [
        "page_id" => "profile_inventory",
        "text" => "Inventory",
        "link" => "inventory"
    ],
];

?>


<div class="toolbar">

    <div class="row">

        <div class="col-4 m-auto">
            <div class="row">
                <div class="col col-w5 m-auto">
                    <div class="avatar-md">
                        <img class=" " src="/<?= SUBFOLDER ?>src/images/users/<?= $user["id"] ?>.png" onerror="this.src='/<?= SUBFOLDER ?>src/images/users/default.png';">
                    </div>
                </div>

                <div class="col m-auto">
                    <div class="text">
                        <span class="text-stronsg text-md"><?= $user["name"] ?></span>
                    </div>
                    <div class="text-muted text-xs"><?= $user["designation"] ?></div>
                </div>
            </div>
        </div>

        <?php if ($user_id == auth::user_id()) { ?>

            <div class="col-w12 m-auto">
                <a class="pill bg-danger text-light flot-right" href="logout"><?= UI::icon("logout") ?> Logout </a>
            </div>

        <?php } ?>

    </div>

</div>