export enum UserRole {
  DCB_PARTNER_ADMIN = 'DCB_PARTNER_ADMIN',
  DCB_PARTNER_MANAGER = 'DCB_PARTNER_MANAGER',
  DCB_PARTNER_SUPPORT = 'DCB_PARTNER_SUPPORT',
  DCB_PARTNER = 'DCB_PARTNER',
  DCB_ADMIN = 'DCB_ADMIN',
  DCB_SUPPORT = 'DCB_SUPPORT'
}

export interface CreateMerchantUserDto {
  username: string;
  email: string;
  firstName: string;
  lastName: string;
  password: string;
  role: UserRole.DCB_PARTNER_ADMIN | UserRole.DCB_PARTNER_MANAGER | UserRole.DCB_PARTNER_SUPPORT;
  enabled?: boolean;
  emailVerified?: boolean;
  merchantPartnerId: string;
}

export interface UpdateMerchantUserDto {
  firstName?: string;
  lastName?: string;
  email?: string;
  enabled?: boolean;
}

export interface ResetPasswordDto {
  newPassword: string;
  temporary?: boolean;
}

export interface MerchantUserResponse {
  id: string;
  username: string;
  email: string;
  firstName: string;
  lastName: string;
  role: UserRole.DCB_PARTNER_ADMIN | UserRole.DCB_PARTNER_MANAGER | UserRole.DCB_PARTNER_SUPPORT;
  enabled: boolean;
  emailVerified: boolean;
  merchantPartnerId: string;
  createdBy: string;
  createdByUsername: string;
  createdTimestamp: number;
  lastLogin?: number;
  userType: 'MERCHANT';
}

export interface MerchantUsersStatsResponse {
  totalAdmins: number;
  totalManagers: number;
  totalSupport: number;
  totalUsers: number;
  activeUsers: number;
  inactiveUsers: number;
}

export interface AvailableRole {
  value: UserRole;
  label: string;
  description: string;
  allowedForCreation: boolean;
}

export interface AvailableRolesResponse {
  roles: AvailableRole[];
}

export interface SearchMerchantUsersParams {
  query?: string;
  role?: UserRole.DCB_PARTNER_ADMIN | UserRole.DCB_PARTNER_MANAGER | UserRole.DCB_PARTNER_SUPPORT;
  enabled?: boolean;
}

export interface RoleOperationResponse {
  message: string;
  success: boolean;
}