define(
    [
        'mage/utils/wrapper',
//MNM   'Amasty_Checkout/js/action/focus-first-error',
        'Amasty_CheckoutCore/js/model/payment-validators/login-form-validator'
    ],
    function (wrapper, /*MNM focusFirstError,*/ loginFormValidator) {
        'use strict';

        return function (target) {
            /**
             * Focus first error after validation
             */
            target.validate = wrapper.wrapSuper(target.validate, function (hideError) {
                var result;

                if (!loginFormValidator.validate()) {
                    if (!hideError) {
//MNM                   focusFirstError();
                    }

                    return false;
                }

                result = this._super();

                if (!result && !hideError) {
//MNM                focusFirstError();
                }

                return result;
            });

            return target;
        };
    }
);
