import * as React from "react";
import IJitzSPContext from "../data/interfaces/IJitzSPContext";
import { Persona, PersonaPresence, PersonaSize } from "@fluentui/react";
import UserInfo from "../services/UserService";
import { IPersonOrGroup } from "../common/IModels";
import UtilityServiceLocal from "../services/UtilityService";

export interface IJitzPersonaProps {
  className?: string;
  imageUrl?: string;
  personaSize?: PersonaSize;
  presence?: PersonaPresence;
  showPersonalDetails?: boolean;
  imageInitials?: string;
  text?: string;
  secondaryText?: string;
  tertiaryText?: string;
  optionalText?: string;
}

export interface IJitzPersonaState {}

export class JitzPersona extends React.Component<
  IJitzPersonaProps,
  IJitzPersonaState
> {
  private _userInfo!: UserInfo;

  constructor(props: IJitzPersonaProps, state: IJitzPersonaState) {
    super(props);
    this.state = {
      user: {},
    };
  }

  public componentDidMount() {}

  public componentWillReceiveProps(nextProps: IJitzPersonaProps) {}

  public render(): React.ReactElement<IJitzPersonaProps> {
    return (
      <Persona
        className={this.props.className || ""}
        {...this.props}
        text={this.props.text}
        hidePersonaDetails={!this.props.showPersonalDetails}
        size={this.props.personaSize || PersonaSize.size56}
        presence={this.props.presence || PersonaPresence.none}
        imageAlt={``}
      />
    );
  }
}
