define([ 'jquery', 'Magento_Ui/js/modal/modal' ], function ($) { $.widget('mage.amhideprice', { options: {}, _create: function () { if (this.element) { var parent = this.element.parents(this.options['parent']).first(); if (!parent) { return; } var button = parent.find(this.options['button']), addButton = parent.find('.actions-primary form button'); if (button && button[0] && (this.options['hide_addtocart'] === '1' || this.options['hide_addtocart'] === '2') ) { button[0].outerHTML = this.options['html']; eval($('