import store from 'store'

class Storage{
    set(key,prop,value){
        const obj = store.get(key)||{};
        obj[prop] = value;
        store.set(key,obj);
    }

    get(key,prop){
        const obj = store.get(key)||{};
        return obj[prop];
    }

    setModel(key,model){
        store.set(key,model);
    }

    remove(key){
        store.remove(key);
    }
}

export default new Storage();