// Code generated by mockery. DO NOT EDIT.

package mocks

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

	context "context"

	l1infotreesync "github.com/agglayer/aggkit/l1infotreesync"

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

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

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

type L1InfoTreeQuerier_Expecter struct {
	mock *mock.Mock
}

func (_m *L1InfoTreeQuerier) EXPECT() *L1InfoTreeQuerier_Expecter {
	return &L1InfoTreeQuerier_Expecter{mock: &_m.Mock}
}

// GetInfoByGlobalExitRoot provides a mock function with given fields: ger
func (_m *L1InfoTreeQuerier) GetInfoByGlobalExitRoot(ger common.Hash) (*l1infotreesync.L1InfoTreeLeaf, error) {
	ret := _m.Called(ger)

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

	var r0 *l1infotreesync.L1InfoTreeLeaf
	var r1 error
	if rf, ok := ret.Get(0).(func(common.Hash) (*l1infotreesync.L1InfoTreeLeaf, error)); ok {
		return rf(ger)
	}
	if rf, ok := ret.Get(0).(func(common.Hash) *l1infotreesync.L1InfoTreeLeaf); ok {
		r0 = rf(ger)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*l1infotreesync.L1InfoTreeLeaf)
		}
	}

	if rf, ok := ret.Get(1).(func(common.Hash) error); ok {
		r1 = rf(ger)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetInfoByGlobalExitRoot is a helper method to define mock.On call
//   - ger common.Hash
func (_e *L1InfoTreeQuerier_Expecter) GetInfoByGlobalExitRoot(ger interface{}) *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call {
	return &L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call{Call: _e.mock.On("GetInfoByGlobalExitRoot", ger)}
}

func (_c *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call) Run(run func(ger common.Hash)) *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(common.Hash))
	})
	return _c
}

func (_c *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call) Return(_a0 *l1infotreesync.L1InfoTreeLeaf, _a1 error) *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call) RunAndReturn(run func(common.Hash) (*l1infotreesync.L1InfoTreeLeaf, error)) *L1InfoTreeQuerier_GetInfoByGlobalExitRoot_Call {
	_c.Call.Return(run)
	return _c
}

// GetInfoByIndex provides a mock function with given fields: ctx, index
func (_m *L1InfoTreeQuerier) GetInfoByIndex(ctx context.Context, index uint32) (*l1infotreesync.L1InfoTreeLeaf, error) {
	ret := _m.Called(ctx, index)

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

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

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

	return r0, r1
}

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

// GetInfoByIndex is a helper method to define mock.On call
//   - ctx context.Context
//   - index uint32
func (_e *L1InfoTreeQuerier_Expecter) GetInfoByIndex(ctx interface{}, index interface{}) *L1InfoTreeQuerier_GetInfoByIndex_Call {
	return &L1InfoTreeQuerier_GetInfoByIndex_Call{Call: _e.mock.On("GetInfoByIndex", ctx, index)}
}

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

func (_c *L1InfoTreeQuerier_GetInfoByIndex_Call) Return(_a0 *l1infotreesync.L1InfoTreeLeaf, _a1 error) *L1InfoTreeQuerier_GetInfoByIndex_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeQuerier_GetInfoByIndex_Call) RunAndReturn(run func(context.Context, uint32) (*l1infotreesync.L1InfoTreeLeaf, error)) *L1InfoTreeQuerier_GetInfoByIndex_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

// GetLastL1InfoTreeRoot is a helper method to define mock.On call
//   - ctx context.Context
func (_e *L1InfoTreeQuerier_Expecter) GetLastL1InfoTreeRoot(ctx interface{}) *L1InfoTreeQuerier_GetLastL1InfoTreeRoot_Call {
	return &L1InfoTreeQuerier_GetLastL1InfoTreeRoot_Call{Call: _e.mock.On("GetLastL1InfoTreeRoot", ctx)}
}

func (_c *L1InfoTreeQuerier_GetLastL1InfoTreeRoot_Call) Run(run func(ctx context.Context)) *L1InfoTreeQuerier_GetLastL1InfoTreeRoot_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

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

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

// IsUpToDate provides a mock function with given fields: ctx, l1Client
func (_m *L1InfoTreeQuerier) IsUpToDate(ctx context.Context, l1Client aggkittypes.BaseEthereumClienter) (bool, error) {
	ret := _m.Called(ctx, l1Client)

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

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, aggkittypes.BaseEthereumClienter) (bool, error)); ok {
		return rf(ctx, l1Client)
	}
	if rf, ok := ret.Get(0).(func(context.Context, aggkittypes.BaseEthereumClienter) bool); ok {
		r0 = rf(ctx, l1Client)
	} else {
		r0 = ret.Get(0).(bool)
	}

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

	return r0, r1
}

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

// IsUpToDate is a helper method to define mock.On call
//   - ctx context.Context
//   - l1Client aggkittypes.BaseEthereumClienter
func (_e *L1InfoTreeQuerier_Expecter) IsUpToDate(ctx interface{}, l1Client interface{}) *L1InfoTreeQuerier_IsUpToDate_Call {
	return &L1InfoTreeQuerier_IsUpToDate_Call{Call: _e.mock.On("IsUpToDate", ctx, l1Client)}
}

func (_c *L1InfoTreeQuerier_IsUpToDate_Call) Run(run func(ctx context.Context, l1Client aggkittypes.BaseEthereumClienter)) *L1InfoTreeQuerier_IsUpToDate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(aggkittypes.BaseEthereumClienter))
	})
	return _c
}

func (_c *L1InfoTreeQuerier_IsUpToDate_Call) Return(_a0 bool, _a1 error) *L1InfoTreeQuerier_IsUpToDate_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeQuerier_IsUpToDate_Call) RunAndReturn(run func(context.Context, aggkittypes.BaseEthereumClienter) (bool, error)) *L1InfoTreeQuerier_IsUpToDate_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
