import { useUserStore } from '@/stores/index.js';

const userStore = useUserStore();

// 获取用户角色信息
const userRoles = userStore.userInfo?.roles ?? [];
const isUserVip = userRoles.some((role: any) => role.roleCode === 'YiXinAi-Vip');

// 用户头像
const userProfilePicture = userStore.userInfo?.user?.icon ? `${import.meta.env.VITE_WEB_BASE_API}/file/${userStore.userInfo.user.icon}` : `/images/user.png`;
// 系统头像
const systemProfilePicture = `/images/logo.png`;

export {
  isUserVip,
  systemProfilePicture,
  userProfilePicture,
};
