// avatarGenerator.ts
import { avataaarsNeutral, initials } from "@dicebear/collection";
import { createAvatar, Result } from "@dicebear/core";
// const { logout, valuesSession } = useAuth();
// const { session } = valuesSession();
// const perfil_usuario = session.perfil_usuario;

const perfil_usuario = 1000;
let avatar: Result | undefined;

const generateAvatar = (): string => {
  perfil_usuario === 1000
    ? (avatar = createAvatar(avataaarsNeutral, {
        seed: "Zoe",
        // ... other options
      }))
    : (avatar = createAvatar(initials, {
        seed: "Zoe",
        // ... other options
      }));

  // Check if avatar is defined before calling toString
  return avatar ? avatar.toString() : "";
};

export default generateAvatar;
