{"size": 622, "ext": "js", "max_stars_repo_path": "packages/sample-app/src/store/app/app.js", "max_stars_repo_name": "LWC-Essentials/wire-adapters", "max_stars_repo_stars_event_min_datetime": "2020-02-02T19:30:24.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-07T10:45:31.000Z", "max_issues_repo_path": "packages/sample-app/src/store/app/app.js", "max_issues_repo_name": "toojannarong/wire-adapters", "max_issues_repo_issues_event_min_datetime": "2020-09-04T23:54:05.000Z", "max_issues_repo_issues_event_max_datetime": "2020-12-21T02:18:09.000Z", "max_forks_repo_path": "packages/sample-app/src/store/app/app.js", "max_forks_repo_name": "toojannarong/wire-adapters", "max_forks_repo_forks_event_min_datetime": "2020-11-11T17:56:13.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-11T17:56:13.000Z"}
{"max_stars_count": 17, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 25.9166666667, "max_line_length": 112, "alphanum_fraction": 0.6350482315}
/*
    Copyright (c) 2020, salesforce.com, inc.
    All rights reserved.
    SPDX-License-Identifier: BSD-3-Clause
    For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { LightningElement } from 'lwc';
import { getEntry, reinitialize } from '@lwce/store';
import { addToCart } from '../../commerce/cart';

export default class App extends LightningElement {

    handleAddBeer() {
        const cart = getEntry("cart");
        if(cart.data) {
            addToCart(cart.data);
        }
    }

    handleReset() {
        reinitialize("cart");
    }
}
