import { openDB } from 'idb';

const dbPromise = openDB('chats', 1, {
  upgrade(db) {
    db.createObjectStore('titles', { keyPath: 'titles' });
    db.createObjectStore('history', { keyPath: 'history' });
  },
});

export default dbPromise;
