export const cleanBasketData = (basket) => {

    if(typeof basket !== 'undefined') {
        
        delete basket.basket_complimented;
        delete basket.basket_html;
        delete basket.delivery_options;

        if (basket.items?.length) {

            basket.items = basket.items.map(item => {

                const i = {
                    id: item.id,
                    item_id: item.item_id
                };

                return i;

            });

        }

    }
    
    return basket;
    
}
