using System.Collections.Generic;
using Microsoft.IdentityModel.Tokens;
using TIAM.Entities.Users;

namespace TIAMWebApp.Shared.Application.Models
{
    public class UserSessionModel
    {
        public Guid UserId { get; set; }
        public UserType UserType { get; set; }
        public string? UserName { get; set; }
        public string DisplayName => string.IsNullOrWhiteSpace(UserName) ? UserId.ToString() : UserName;

        public Dictionary<Guid, string>? HasProperties { get; set; }
        public int UserRoles { get; set; }
        public Dictionary<int, string> UserRolesDictionary { get; set; }

        public UserSessionModel(Guid userId, UserType userType, string? userName, Dictionary<Guid, string>? hasProperties, int userRoles)
        {
            UserId = userId;
            UserType = userType;
            UserName = userName;
            HasProperties = hasProperties;
            //UserRoles = userRoles;
            //UserRolesDictionary = new Dictionary<int, string>();
        }
    }

    public enum UserType
    {
        Hotel = 1,
        Transfer = 2,
        Guide = 3,
        Admin = 4,
        User = 5,
        Driver = 6
    }
}
