export enum UserRole {
  ADMIN = 'admin',
  PROVIDER = 'provider',
  PARTNER = 'partner',
  CONSUMER = 'consumer',
}

export type TRoles = keyof typeof UserRole;

export interface User {
  fullName: string;
  role: TRoles;
  // id: string;
  // email: string;
  // firstName: string;
  // lastName: string;
  // permissions: Permission[];
  // isActive: boolean;
  // lastLogin?: Date;
  // createdAt: Date;
  // updatedAt: Date;
}

export interface Permission {
  id: string;
  name: string;
  resource: string;
  action: string;
}

export interface IAuthResponse {
  // user: User;
  accessToken: string;
  refreshToken: string;
  account: IAuthAccountResponse;
}

export interface IAuthAccountResponse {
  id: string;
  username: string;
  type: TRoles;
  status: string;
  created_at: string;
  user_id: string;
  partner_id?: string;
  business_id?: string;
  provider_id?: string;
  pos_id?: string;
  user: IAuthAccountUser;
  role: string;
}
interface IAuthAccountUser {
  id: string;
  created_at: string;
  mobile_number: string;
  national_code: string;
  first_name: string;
  last_name: string;
}

export interface LoginCredentials {
  username: string;
  password: string;
  captcha: string;
}

export interface IUserLoginInfo {
  username: string;
  password: string;
  mobile: string;
  email: string;
}

export interface ISignupRequestPayload {
  firstName: string;
  lastName: string;
  gender: boolean;
  mobile: string;
  email: string;
  username: string;
  password: string;
}
