class manageSkusController {

    constructor(RealtimeProductResource, $log, notify, $sce) {
        'ngInject';
        this.RealtimeProductResource = RealtimeProductResource;
        this.$log = $log;
        this.notify = notify;
        this.$sce = $sce;
    } 

    $onInit() {
    }


    removeSku(sku) {
        this.RealtimeProductResource.removeSkuByProductAndSku(this.product, sku)
        .then((doc) => {
            this.notify.show('Product updated!','/img/notify.png');
            this.$log.info('Successfully updated', doc);
        })
        .catch((err) => {
            this.$log.info(err);
        })
        .finally(() => {
            this.onUpdate();
        });
    };
}

export default manageSkusController;