// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	bridgesync "github.com/agglayer/aggkit/bridgesync"
	common "github.com/ethereum/go-ethereum/common"

	context "context"

	mock "github.com/stretchr/testify/mock"

	types "github.com/agglayer/aggkit/aggsender/types"
)

// OptimisticSignatureCalculator is an autogenerated mock type for the OptimisticSignatureCalculator type
type OptimisticSignatureCalculator struct {
	mock.Mock
}

type OptimisticSignatureCalculator_Expecter struct {
	mock *mock.Mock
}

func (_m *OptimisticSignatureCalculator) EXPECT() *OptimisticSignatureCalculator_Expecter {
	return &OptimisticSignatureCalculator_Expecter{mock: &_m.Mock}
}

// Sign provides a mock function with given fields: ctx, aggchainReq, newLocalExitRoot, claims
func (_m *OptimisticSignatureCalculator) Sign(ctx context.Context, aggchainReq types.AggchainProofRequest, newLocalExitRoot common.Hash, claims []bridgesync.Claim) (common.Hash, error) {
	ret := _m.Called(ctx, aggchainReq, newLocalExitRoot, claims)

	if len(ret) == 0 {
		panic("no return value specified for Sign")
	}

	var r0 common.Hash
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, types.AggchainProofRequest, common.Hash, []bridgesync.Claim) (common.Hash, error)); ok {
		return rf(ctx, aggchainReq, newLocalExitRoot, claims)
	}
	if rf, ok := ret.Get(0).(func(context.Context, types.AggchainProofRequest, common.Hash, []bridgesync.Claim) common.Hash); ok {
		r0 = rf(ctx, aggchainReq, newLocalExitRoot, claims)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(common.Hash)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, types.AggchainProofRequest, common.Hash, []bridgesync.Claim) error); ok {
		r1 = rf(ctx, aggchainReq, newLocalExitRoot, claims)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// OptimisticSignatureCalculator_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign'
type OptimisticSignatureCalculator_Sign_Call struct {
	*mock.Call
}

// Sign is a helper method to define mock.On call
//   - ctx context.Context
//   - aggchainReq types.AggchainProofRequest
//   - newLocalExitRoot common.Hash
//   - claims []bridgesync.Claim
func (_e *OptimisticSignatureCalculator_Expecter) Sign(ctx interface{}, aggchainReq interface{}, newLocalExitRoot interface{}, claims interface{}) *OptimisticSignatureCalculator_Sign_Call {
	return &OptimisticSignatureCalculator_Sign_Call{Call: _e.mock.On("Sign", ctx, aggchainReq, newLocalExitRoot, claims)}
}

func (_c *OptimisticSignatureCalculator_Sign_Call) Run(run func(ctx context.Context, aggchainReq types.AggchainProofRequest, newLocalExitRoot common.Hash, claims []bridgesync.Claim)) *OptimisticSignatureCalculator_Sign_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(types.AggchainProofRequest), args[2].(common.Hash), args[3].([]bridgesync.Claim))
	})
	return _c
}

func (_c *OptimisticSignatureCalculator_Sign_Call) Return(_a0 common.Hash, _a1 error) *OptimisticSignatureCalculator_Sign_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *OptimisticSignatureCalculator_Sign_Call) RunAndReturn(run func(context.Context, types.AggchainProofRequest, common.Hash, []bridgesync.Claim) (common.Hash, error)) *OptimisticSignatureCalculator_Sign_Call {
	_c.Call.Return(run)
	return _c
}

// NewOptimisticSignatureCalculator creates a new instance of OptimisticSignatureCalculator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewOptimisticSignatureCalculator(t interface {
	mock.TestingT
	Cleanup(func())
}) *OptimisticSignatureCalculator {
	mock := &OptimisticSignatureCalculator{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
