import { Component, Input, OnInit } from '@angular/core';
import { AuthService } from '@shared/auth/auth.service';
import { ConfigService } from '@shared/config/config.service';
import { LanguageService } from '@shared/language/language.service';

@Component({
  selector: 'app-hello-user-button',
  templateUrl: './hello-user-button.component.html',
  styleUrls: ['./hello-user-button.component.scss']
})
export class HelloUserButtonComponent implements OnInit {
  @Input() panel: string;
  topBarGravatarStyle = {
    width: '24px',
    borderRadius: '100%',
    marginLeft: '15px',
    verticalAlign: 'middle'
  } as any;
  menuGravatarStyle = {
    width: '50px',
    marginRight: '10px',
    verticalAlign: 'top'
  } as any;
  constructor(
    public authService: AuthService,
    public config: ConfigService,
    public languageService: LanguageService,
  ) {
    if (this.languageService.langDirection === 'rtl') {
      this.topBarGravatarStyle = {
        width: '24px',
        borderRadius: '100%',
        marginRight: '15px',
        verticalAlign: 'middle'
      };
      this.menuGravatarStyle = {
        width: '50px',
        marginLeft: '10px',
        verticalAlign: 'top'
      };
    }
  }

  ngOnInit() {
  }

}
