export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;

export const API_ENDPOINTS = {
  signup: "/user/signup",
  verifyEmail: "/user/verifyEmail",
  resendOtp: "/user/resendCode",
  categoryTree: "/category/public",
  signin: "/user/login/email",
  refreshToken: "/user/refreshToken",
  profile: "/user/profile",
  publicUserList: "/user/public/list",
  updateProfile: "/user/updateProfile",
  billingRegion: "/user/billing-region",
  attachment: "/attachment",
  forgotPassword: "/user/forgot-password",
  resetPassword: "/user/reset-password",
  testimonials: "/testimonials",
  blogCategories: "/category/public/post/listAll",
  blogPosts: "/post/public/post/list",
  pageList: "/post/public/page/list",
  blogPostByCode: "/post/public",
  comment: "/comment",
  commentList: "/comment/list",
  questionList: "/sea-qa/public/question/list",
  questionBySlug: "/sea-qa/public/question",
  createQuestion: "/sea-qa/question",
  createAnswer: "/sea-qa/question",
  answer: "/sea-qa/answer",
  answerList: "/sea-qa/answer/list",
  planList: "/plan/list",
  buySubscription: "/payment/buy-subscription",
  cancelSubscription: "/payment/cancel-subscription",
  verifyPayment: "/payment/verify",
  transactionList: "/payment/tranasction/list",
  contactUs: "/contactus",
  updatePassword: "/user/update-password",
  notificationList: "/notificationLog/list",
  notificationUnreadCount: "/notificationLog/unread-count",
  notificationLog: "/notificationLog",
};

export const REDUX_PERSIST_KEY = "root";

export const SUBSCRIPTION_STATUS = {
  PENDING: 0,
  ACTIVE: 1,
  CANCELLED: 2,
  FAILED: 3,
  DUE: 4,
  EXPIRED: 8,
} as const;

export type SubscriptionStatus =
  (typeof SUBSCRIPTION_STATUS)[keyof typeof SUBSCRIPTION_STATUS];

// Which plan-price currency to show for each billing region.
export const BILLING_REGION_CURRENCY = {
  INDIA: "INR",
  OUTSIDE_INDIA: "USD",
} as const;

export const NOTIFICATION_CODE = {
  QUESTION_APPROVED: "question_approved",
  ANSWER_APPROVED: "answer_approved",
  QUESTION_GOOD: "question_good",
  ANSWER_FEATURED: "answer_featured",
  REQUEST_ANSWER: "request_answer",
  ANSWER_REJECTED: "answer_rejected",
  QUESTION_REJECTED: "question_rejected",
} as const;

export type NotificationCode =
  (typeof NOTIFICATION_CODE)[keyof typeof NOTIFICATION_CODE];
