import { LocalStorageService } from './local-storage.services';
import {
  LS_DEFAULT_URL,
  LS_ACTIVE_ACCOUNT,
  IDB_T_NAME__USER_DATA,
  IDB_T_NAME__ACCESS_TOKEN,
  IDB_T_NAME__PRIVILEGE,
} from './storage.key';
import { IndexedDbService } from './indexed-db.services';
import { appConfig } from './indexed-db.init';

// LOCAL STORAGE NO NEED PROMISE FOR CALL
export const StorageActiveAccount = new LocalStorageService(LS_ACTIVE_ACCOUNT);
export const StorageDefaultURL = new LocalStorageService(LS_DEFAULT_URL);

// LOCAL STORAGE NEED PROMISE FOR CALL
export const StorageUserData = new IndexedDbService(appConfig, IDB_T_NAME__USER_DATA);
export const StorageAccessToken = new IndexedDbService(appConfig, IDB_T_NAME__ACCESS_TOKEN);
export const StoragePrivilege = new IndexedDbService(appConfig, IDB_T_NAME__PRIVILEGE);
