/*!
 * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.
 */

import SessionStorageStoreAdapter from '@ciscospark/storage-adapter-session-storage';

export default {
  device: {
    enableInactivityEnforcement: true
  },
  storage: {
    boundedAdapter: new SessionStorageStoreAdapter('web-client-internal-bounded'),
    unboundedAdapter: new SessionStorageStoreAdapter('web-client-internal-unbounded')
  }
};

/*!
 * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.
 */

/* eslint-env browser */

import LocalForageStoreAdapter from '@ciscospark/storage-adapter-local-forage';
import LocalStorageStoreAdapter from '@ciscospark/storage-adapter-local-storage';
import SessionStorageStoreAdapter from '@ciscospark/storage-adapter-session-storage';

let boundedAdapter;
let unboundedAdapter;

if (localStorage && localStorage.getItem('remember-me') === 'true') {
  boundedAdapter = new LocalStorageStoreAdapter('web-client-internal');
  unboundedAdapter = new LocalForageStoreAdapter('web-client-internal');
}
else {
  boundedAdapter = new SessionStorageStoreAdapter('web-client-internal-bounded');
  unboundedAdapter = new SessionStorageStoreAdapter('web-client-internal-unbounded');
}

export default {
  device: {
    enableInactivityEnforcement: true
  },
  storage: {
    boundedAdapter,
    unboundedAdapter
  }
};

Add multiple stores