// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	context "context"

	types "github.com/agglayer/aggkit/tree/types"
	mock "github.com/stretchr/testify/mock"
)

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

type L1InfoTreeRootByLeafQuerier_Expecter struct {
	mock *mock.Mock
}

func (_m *L1InfoTreeRootByLeafQuerier) EXPECT() *L1InfoTreeRootByLeafQuerier_Expecter {
	return &L1InfoTreeRootByLeafQuerier_Expecter{mock: &_m.Mock}
}

// GetL1InfoRootByLeafIndex provides a mock function with given fields: ctx, leafCount
func (_m *L1InfoTreeRootByLeafQuerier) GetL1InfoRootByLeafIndex(ctx context.Context, leafCount uint32) (*types.Root, error) {
	ret := _m.Called(ctx, leafCount)

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

	var r0 *types.Root
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint32) (*types.Root, error)); ok {
		return rf(ctx, leafCount)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint32) *types.Root); ok {
		r0 = rf(ctx, leafCount)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.Root)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
		r1 = rf(ctx, leafCount)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetL1InfoRootByLeafIndex is a helper method to define mock.On call
//   - ctx context.Context
//   - leafCount uint32
func (_e *L1InfoTreeRootByLeafQuerier_Expecter) GetL1InfoRootByLeafIndex(ctx interface{}, leafCount interface{}) *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call {
	return &L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call{Call: _e.mock.On("GetL1InfoRootByLeafIndex", ctx, leafCount)}
}

func (_c *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call) Run(run func(ctx context.Context, leafCount uint32)) *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(uint32))
	})
	return _c
}

func (_c *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call) Return(_a0 *types.Root, _a1 error) *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call) RunAndReturn(run func(context.Context, uint32) (*types.Root, error)) *L1InfoTreeRootByLeafQuerier_GetL1InfoRootByLeafIndex_Call {
	_c.Call.Return(run)
	return _c
}

// NewL1InfoTreeRootByLeafQuerier creates a new instance of L1InfoTreeRootByLeafQuerier. 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 NewL1InfoTreeRootByLeafQuerier(t interface {
	mock.TestingT
	Cleanup(func())
}) *L1InfoTreeRootByLeafQuerier {
	mock := &L1InfoTreeRootByLeafQuerier{}
	mock.Mock.Test(t)

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

	return mock
}
