export interface CoreResponse<TData> {
  success: boolean;
  message: string;
  data: TData;
}

export interface CoreAPIPagination {
  page: number;
  limit: number;
  total: number;
  totalPages: number;
  hasNextPage: number;
  hasPrevPage: boolean;
}

export interface CoreAPIError {
  success: boolean;
  message: string;
  data: null;
}

export type RolePrivilegeType = "read" | "create" | "update" | "delete";

export type RoleSlugType =
  | "members"
  | "bookings"
  | "membership-clubs"
  | "account-types"
  | "charge-centers"
  | "user-management"
  | "role-management"
  | "account-status"
  | "notifications"
  | "dashboard"
  | "points-transfer"
  | "my-points";

export interface DecodedRole {
  create: boolean;
  read: boolean;
  update: boolean;
  delete: boolean;
  feature_name: string;
  feature_slug: RoleSlugType;
  role_name: string;
  role_description: string;
  console_feature_id: string;
  console_role_id: string;
}

export interface AccessScope {
  create: boolean;
  read: boolean;
  update: boolean;
  delete: boolean;
  superAdmin: boolean;
}

export interface ConsoleUser {
  /** Set once the user uploads a photo on their profile page. */
  avatar_url?: string | null;
  id: string;
  email: string;
  first_name: string;
  last_name: string;
  username: string;
  is_super_admin: boolean;
  is_active: boolean;
}
