define(['jquery','Magento_Ui/js/modal/modal','SmartSolutions_CatalogActionPopup/js/actionMessagePopup','mage/storage','jquery/jquery-storageapi'],function($,modal,actionMessagePopup,storage){'use strict';return function(widget){$.widget('mage.catalogAddToCart',widget,{ajaxSubmit:function(form,forceContinue){if(true===forceContinue){return this._super(form);} let actionPopup=actionMessagePopup();let popupDiv=$('.product-info-main .product__popup-message') if(!popupDiv.length){return this._super(form);} let pId=actionPopup.getPId(popupDiv);if(pId&&!actionPopup.isStoragePidSet(pId)){let callback=this.ajaxSubmit;let boundedCallback=callback.bind(this);actionPopup.displayPopup(popupDiv,pId,boundedCallback,form,true);}else{return this._super(form);}},});return $.mage.catalogAddToCart;};});