export enum Relationships {
  BOSS = 'BOSS',
}

export enum Visibility {
  ALL = 'ALL',
  USER_AND_ADMINS = 'USER_AND_ADMINS',
  ADMINS_ONLY = 'ADMINS_ONLY',
}

export enum IconsStyle {
  ICONS = 'ICONS',
  DUO_TONE = 'DUO_TONE',
  GRADIENT = 'GRADIENT',
}

export type PasswordType = {
  validateMinLength?: boolean;
  validateUpperCaseLetter?: boolean;
  validateLowerCaseLetter?: boolean;
  validateNumbers?: boolean;
  validateSpecialCharacter?: boolean;
};

export type AllowSocialNetworks = {
  allowTwitter: boolean;
  allowFacebook: boolean;
  allowLinkedin: boolean;
  allowWhatsApp: boolean;
  allowInstagram: boolean;
};

export type StaticProfileSettings = {
  passwordType: PasswordType;
  allowSocialNetworks: AllowSocialNetworks;
  allowHiringDate: boolean;
  allowNickname: boolean;
  editableName: boolean;
  editableProfilePicture: boolean;
  editableCoverPicture: boolean;
  editableEmail: boolean;
  editableBirthdate: boolean;
};

export type AcknowledgmentsPermissions = {
  viewAcknowledgementsRanking: boolean;
  acknowledgmentsCanBeCommented: boolean;
  showAcknowledgmentsPoints: boolean;
};

export type Translations = {
  ORGANIZATION_CHARTS?: string;
  ARTICLES?: string;
  FEED?: string;
  KNOWLEDGE_LIBRARIES?: string;
  ONBOARDINGS?: string;
  TIME_OFF?: string;
  GOALS?: string;
  PEOPLE_EXPERIENCE?: string;
  PEOPLE?: string;
  ACKNOWLEDGEMENTS?: string;
  SERVICE_PORTAL?: string;
  COMMUNICATION?: string;
  GROUPS?: string;
  LEARNING?: string;
  EMPLOYEE_LIFECYCLE?: string;
  TASKS?: string;
  // Learnings
  COURSES?: string;
  PATHS?: string;
  LEARNING_SESSIONS?: string;
  // Sports Pool
  SPORTS_POOL?: string;
};

export type ModulesName = {
  es: Translations;
  en: Translations;
  pt: Translations;
  'pt-br': Translations;
};

export type Instance = StaticProfileSettings &
  AcknowledgmentsPermissions & {
    color: string;
    id: number;
    logo: string;
    name: string;
    otpAfterRegularLogin: boolean;
    hasTermsAndConditions: boolean;
    emailInProfileVisibility: Visibility;
    allowAttachmentsInChats: boolean;
    allowCreateChats: boolean;
    allowLiveStream: boolean;
    allowChatCall: boolean;
    moduleNames?: ModulesName;
    userInactivity: number;
    passwordInDocumentsTimer?: number;
    forceOTP?: boolean;
    externalBotId: string | null;
    maxPostSizeInMB: number;
    timezone: string;
    iconsStyle: IconsStyle;
    defaultCurrencyCode: string | null;
    language: string;
    vacationPublicCalendar: boolean;
    hideFileDownload: boolean;
  };

export type MeInstance = {
  id: number;
  name: string;
  logo: string;
  color: string;
  language: string;
  timezone: string;
  iconsStyle: IconsStyle;
  forceOTP?: boolean;
  otpAfterRegularLogin: boolean;
  editableName: boolean;
  editableEmail: boolean;
  editableBirthdate: boolean;
  editableProfilePicture: boolean;
  editableCoverPicture: boolean;
  allowNickname: boolean;
  allowHiringDate: boolean;
  allowSocialNetworks: AllowSocialNetworks;
  allowCreateChats: boolean;
  allowChatCall: boolean;
  allowAttachmentsInChats: boolean;
  allowLiveStream: boolean;
  acknowledgmentsCanBeCommented: boolean;
  viewAcknowledgementsRanking: boolean;
  showAcknowledgmentsPoints: boolean;
  hasTermsAndConditions: boolean;
  passwordInDocumentsTimer?: number;
  maxPostSizeInMB: number;
  hideFileDownload: boolean;
  defaultCurrencyCode: string | null;
  vacationPublicCalendar: boolean;
  userInactivity: number;
  moduleNames?: ModulesName;
  externalBotId: string | null;
  emailInProfileVisibility: Visibility;
  defaultCoverPicture?: string;
};

export type InstanceData = {
  id?: number;
  firstName: string;
  lastName: string;
  email: string;
  password: string;
  instanceName: any;
  size: any;
  color: any;
  language: any;
  logo: any;
};

export type SendInvitationData = {
  emailsArray: string[];
  token: string;
};

export type ProfileData = {
  editableByUser: boolean;
  i18n: Object;
  name: string;
  position: number;
  suggestions: string[];
  options: string[];
  type: string;
};

export type FieldValues = {
  phoneNumber: string;
  linkedIn: string;
  instagram: string;
  facebook: string;
  twitter: string;
  firstName: string;
  lastName: string;
  nickname: string;
  profileData: object;
  birthdate: string;
};

export type ProfileDataMap = Record<string, ProfileData>;
