<?php

defined( 'ABSPATH' ) || exit;

$data = [];

if ( helpgent_get_valid_user() ) {

    $user = helpgent_get_current_user();

    $data['user'] = [
        'id'         => $user->get_id(),
        'name'       => $user->get_name(),
        'email'      => $user->get_email(),
        'avatar_url' => get_avatar_url( $user->get_email() ),
    ];
}

include_once __DIR__ . '/font-family.php';

?>
<div class="helpgent-app helpgent-user-dashboard" data-user="<?php helpgent_render( htmlspecialchars( json_encode( $data ), ENT_QUOTES, 'UTF-8' ) )?>"></div>