export enum UserRole {
  TRAINER = 'TRAINER',
  COORDINATOR = 'COORDINATOR',
  MANAGER = 'MANAGER',
  RECEPTIONIST = 'RECEPTIONIST',
  CLUB_ADMIN = 'CLUB_ADMIN',
  SUPER_ADMIN = 'SUPER_ADMIN',
}

export enum TrainingStatus {
  PLANNED = 'PLANNED',
  CONFIRMED = 'CONFIRMED',
  PAID = 'PAID',
  NOT_PAID = 'NOT_PAID',
  NO_SHOW = 'NO_SHOW',
  CANCELLED = 'CANCELLED',
}

export enum CancelReason {
  CLIENT_CANCEL = 'CLIENT_CANCEL',
  NO_DEDUCTION = 'NO_DEDUCTION',
  SALE_RETURN = 'SALE_RETURN',
  SICK = 'SICK',
}

export enum FunnelStage {
  NEW = 'NEW',
  ASSIGNED = 'ASSIGNED',
  APPOINTMENT_SET = 'APPOINTMENT_SET',
  COMPLETED = 'COMPLETED',
  REGULAR = 'REGULAR',
  TRANSFERRED = 'TRANSFERRED',
  REFUSED = 'REFUSED',
}

export enum SaleStatus {
  PENDING = 'PENDING',
  PAID = 'PAID',
  CANCELLED = 'CANCELLED',
  REFUNDED = 'REFUNDED',
}

export enum CallDirection {
  OUTBOUND = 'OUTBOUND',
}

export enum CallStatus {
  INITIATED = 'INITIATED',
  RINGING = 'RINGING',
  ANSWERED = 'ANSWERED',
  COMPLETED = 'COMPLETED',
  FAILED = 'FAILED',
  NO_ANSWER = 'NO_ANSWER',
  BUSY = 'BUSY',
}

export enum NotificationType {
  CLIENT_ASSIGNED = 'CLIENT_ASSIGNED',
  SERVICE_BOOKED = 'SERVICE_BOOKED',
  SERVICE_PAID = 'SERVICE_PAID',
  PACKAGE_TOPUP = 'PACKAGE_TOPUP',
  BOOKING_CANCELLED = 'BOOKING_CANCELLED',
  TRAINING_DEDUCTED = 'TRAINING_DEDUCTED',
  TRAININGS_ENDING = 'TRAININGS_ENDING',
  CLIENT_RETURNED = 'CLIENT_RETURNED',
  CLIENT_BIRTHDAY = 'CLIENT_BIRTHDAY',
}

export enum LicenseType {
  STARTER = 'STARTER',
  STANDARD = 'STANDARD',
  PREMIUM = 'PREMIUM',
}

export enum Gender {
  MALE = 'MALE',
  FEMALE = 'FEMALE',
}

export enum WebhookEvent {
  CLIENT_CREATED = 'client.created',
  CLIENT_UPDATED = 'client.updated',
  TRAINING_CREATED = 'training.created',
  TRAINING_CANCELLED = 'training.cancelled',
  TRAINING_RESCHEDULED = 'training.rescheduled',
  TRAINING_COMPLETED = 'training.completed',
  SALE_CREATED = 'sale.created',
  SALE_PAID = 'sale.paid',
  FUNNEL_STAGE_CHANGED = 'funnel.stage_changed',
  FUNNEL_ASSIGNED = 'funnel.assigned',
  SCHEDULE_UPDATED = 'schedule.updated',
  MEMBERSHIP_EXPIRING = 'membership.expiring',
}

export enum ModuleId {
  CORE = 'core',
  SALES = 'sales',
  COORDINATOR = 'coordinator',
  PUSH = 'push',
  WEB_RECEPTION = 'web_reception',
  WEB_REPORTS = 'web_reports',
  SIP = 'sip',
  SIP_RECORDING = 'sip_recording',
  WEBHOOKS = 'webhooks',
  CLUB_ADMIN = 'club_admin',
  SYNC_1C = '1c_sync',
  TELEGRAM_BOT = 'telegram_bot',
}

export const API_KEY_SCOPES = [
  'clients:read',
  'clients:write',
  'trainings:read',
  'trainings:write',
  'sales:read',
  'sales:write',
  'funnel:read',
  'funnel:write',
  'stats:read',
  'webhooks:manage',
] as const;

export type ApiKeyScope = (typeof API_KEY_SCOPES)[number];
