export const DEFAULT_TIMEOUT = 5 * 60;
export const DEFAULT_WINDOW_TIMEOUT = 30 * 60;
export const BLOCKLET_SERVICE_PATH_PREFIX = '/.well-known/service';
export const SESSION_TOKEN_STORAGE_KEY = 'login_token';
export const REFRESH_TOKEN_STORAGE_KEY = 'refresh_token';

export const RELAY_SOCKET_PREFIX = '/.well-known/service';
export const API_DID_PREFIX = '/api/did';

export const DASHBOARD_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/admin/overview`;
export const PROFILE_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/user`;
export const DID_SPACE_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/user/did-spaces`;
export const NAVIGATION_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/admin/navigation`;

export const DID_PREFIX = 'did:abt:';

export const PASSPORT_STATUS = {
  VALID: 'valid',
  REVOKED: 'revoked',
};

export const LOGIN_PROVIDER = {
  EMAIL: 'email',
  AUTH0: 'auth0',
  APPLE: 'apple',
  GITHUB: 'github',
  GOOGLE: 'google',
  WALLET: 'wallet',
  NFT: 'nft',
  PASSKEY: 'passkey',
  TWITTER: 'twitter',
};

export const LOGIN_PROVIDER_NAME = {
  [LOGIN_PROVIDER.EMAIL]: 'Email',
  [LOGIN_PROVIDER.AUTH0]: 'Auth0',
  [LOGIN_PROVIDER.APPLE]: 'Apple',
  [LOGIN_PROVIDER.GITHUB]: 'Github',
  [LOGIN_PROVIDER.GOOGLE]: 'Google',
  [LOGIN_PROVIDER.WALLET]: 'DID Wallet',
  [LOGIN_PROVIDER.NFT]: 'NFT',
  [LOGIN_PROVIDER.PASSKEY]: 'Passkey',
  [LOGIN_PROVIDER.TWITTER]: 'X (Twitter)',
};

// HACK: 目前这里的键值不能使用 [LOGIN_PROVIDER.AUTH0] 形式，否则会影响 ts 的 keyof typeof OAUTH_PROVIDER 来获取键值作为类型的判断
export const OAUTH_PROVIDER = {
  email: 'Email',
  auth0: 'Auth0',
  apple: 'Apple',
  github: 'Github',
  google: 'Google',
  twitter: 'X (Twitter)',
};

export const DID_CONNECT_SMALL_WIDTH = 360;
export const DID_CONNECT_MEDIUM_WIDTH = 576;
