// src/types/auth/abilities.ts

export const UserAbilities = {
  // ACCÈS GÉNÉRAL
  CAN_AMEDYA_ACCESS: 'can.amedya.access',

  // OUTFITS
  CAN_CREATE_OUTFIT: 'can.create.outfit',
  CAN_VIEW_OUTFIT: 'can.view.outfit',
  CAN_UPDATE_OUTFIT: 'can.update.outfit',
  CAN_DELETE_OUTFIT: 'can.delete.outfit',
  CAN_LIKE_OUTFIT: 'can.like.outfit',

  // CONSEILS
  CAN_CREATE_ADVICE: 'can.create.advice',
  CAN_VIEW_ADVICE: 'can.view.advice',
  CAN_UPDATE_ADVICE: 'can.update.advice',
  CAN_DELETE_ADVICE: 'can.delete.advice',

  // UTILISATEURS
  CAN_FOLLOW_USER: 'can.follow.user',
  CAN_UNFOLLOW_USER: 'can.unfollow.user',
  CAN_UPDATE_PROFILE_DESCRIPTION: 'can.update.profile.description',
  CAN_UPDATE_PROFILE_IMAGE: 'can.update.profile.image',
  CAN_UPDATE_PROFILE_CITY: 'can.update.profile.city',

  // SIGNALEMENTS
  CAN_REPORT_OUTFIT: 'can.report.outfit',
  CAN_REPORT_ADVICE: 'can.report.advice',
  CAN_REPORT_USER: 'can.report.user',

  // VILLES
  CAN_VIEW_CITY: 'can.view.city',
  CAN_CHANGE_CITY: 'can.change.city',

  // PUBLICITÉS
  CAN_CREATE_ADVERTISEMENT: 'can.create.advertisement',
  CAN_VIEW_ADVERTISEMENT: 'can.view.advertisement',
  CAN_UPDATE_ADVERTISEMENT: 'can.update.advertisement',
  CAN_DELETE_ADVERTISEMENT: 'can.delete.advertisement',
} as const;

// 💡 Ce type génère automatiquement une union de toutes les chaînes de caractères ci-dessus
export type UserAbilityCode = typeof UserAbilities[keyof typeof UserAbilities];