// 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"

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

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

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

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

type L1InfoTreeDataQuerier_Expecter struct {
	mock *mock.Mock
}

func (_m *L1InfoTreeDataQuerier) EXPECT() *L1InfoTreeDataQuerier_Expecter {
	return &L1InfoTreeDataQuerier_Expecter{mock: &_m.Mock}
}

// CheckIfClaimsArePartOfFinalizedL1InfoTree provides a mock function with given fields: finalizedL1InfoTreeRoot, claims
func (_m *L1InfoTreeDataQuerier) CheckIfClaimsArePartOfFinalizedL1InfoTree(finalizedL1InfoTreeRoot *types.Root, claims []bridgesync.Claim) error {
	ret := _m.Called(finalizedL1InfoTreeRoot, claims)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*types.Root, []bridgesync.Claim) error); ok {
		r0 = rf(finalizedL1InfoTreeRoot, claims)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// CheckIfClaimsArePartOfFinalizedL1InfoTree is a helper method to define mock.On call
//   - finalizedL1InfoTreeRoot *types.Root
//   - claims []bridgesync.Claim
func (_e *L1InfoTreeDataQuerier_Expecter) CheckIfClaimsArePartOfFinalizedL1InfoTree(finalizedL1InfoTreeRoot interface{}, claims interface{}) *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call {
	return &L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call{Call: _e.mock.On("CheckIfClaimsArePartOfFinalizedL1InfoTree", finalizedL1InfoTreeRoot, claims)}
}

func (_c *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call) Run(run func(finalizedL1InfoTreeRoot *types.Root, claims []bridgesync.Claim)) *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*types.Root), args[1].([]bridgesync.Claim))
	})
	return _c
}

func (_c *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call) Return(_a0 error) *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call) RunAndReturn(run func(*types.Root, []bridgesync.Claim) error) *L1InfoTreeDataQuerier_CheckIfClaimsArePartOfFinalizedL1InfoTree_Call {
	_c.Call.Return(run)
	return _c
}

// GetFinalizedL1InfoTreeData provides a mock function with given fields: ctx
func (_m *L1InfoTreeDataQuerier) GetFinalizedL1InfoTreeData(ctx context.Context) (types.Proof, *l1infotreesync.L1InfoTreeLeaf, *types.Root, error) {
	ret := _m.Called(ctx)

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

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

	if rf, ok := ret.Get(1).(func(context.Context) *l1infotreesync.L1InfoTreeLeaf); ok {
		r1 = rf(ctx)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*l1infotreesync.L1InfoTreeLeaf)
		}
	}

	if rf, ok := ret.Get(2).(func(context.Context) *types.Root); ok {
		r2 = rf(ctx)
	} else {
		if ret.Get(2) != nil {
			r2 = ret.Get(2).(*types.Root)
		}
	}

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

	return r0, r1, r2, r3
}

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

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

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

func (_c *L1InfoTreeDataQuerier_GetFinalizedL1InfoTreeData_Call) Return(_a0 types.Proof, _a1 *l1infotreesync.L1InfoTreeLeaf, _a2 *types.Root, _a3 error) *L1InfoTreeDataQuerier_GetFinalizedL1InfoTreeData_Call {
	_c.Call.Return(_a0, _a1, _a2, _a3)
	return _c
}

func (_c *L1InfoTreeDataQuerier_GetFinalizedL1InfoTreeData_Call) RunAndReturn(run func(context.Context) (types.Proof, *l1infotreesync.L1InfoTreeLeaf, *types.Root, error)) *L1InfoTreeDataQuerier_GetFinalizedL1InfoTreeData_Call {
	_c.Call.Return(run)
	return _c
}

// GetInfoByIndex provides a mock function with given fields: ctx, index
func (_m *L1InfoTreeDataQuerier) 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
}

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

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

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

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

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

// GetL1InfoRootByLeafIndex provides a mock function with given fields: ctx, leafCount
func (_m *L1InfoTreeDataQuerier) 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
}

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

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

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

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

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

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

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

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

	if rf, ok := ret.Get(1).(func(context.Context) *l1infotreesync.L1InfoTreeLeaf); ok {
		r1 = rf(ctx)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*l1infotreesync.L1InfoTreeLeaf)
		}
	}

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

	return r0, r1, r2
}

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

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

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

func (_c *L1InfoTreeDataQuerier_GetLatestFinalizedL1InfoRoot_Call) Return(_a0 *types.Root, _a1 *l1infotreesync.L1InfoTreeLeaf, _a2 error) *L1InfoTreeDataQuerier_GetLatestFinalizedL1InfoRoot_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

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

// GetProofForGER provides a mock function with given fields: ctx, ger, rootFromWhichToProve
func (_m *L1InfoTreeDataQuerier) GetProofForGER(ctx context.Context, ger common.Hash, rootFromWhichToProve common.Hash) (*l1infotreesync.L1InfoTreeLeaf, types.Proof, error) {
	ret := _m.Called(ctx, ger, rootFromWhichToProve)

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

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

	if rf, ok := ret.Get(1).(func(context.Context, common.Hash, common.Hash) types.Proof); ok {
		r1 = rf(ctx, ger, rootFromWhichToProve)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(types.Proof)
		}
	}

	if rf, ok := ret.Get(2).(func(context.Context, common.Hash, common.Hash) error); ok {
		r2 = rf(ctx, ger, rootFromWhichToProve)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// GetProofForGER is a helper method to define mock.On call
//   - ctx context.Context
//   - ger common.Hash
//   - rootFromWhichToProve common.Hash
func (_e *L1InfoTreeDataQuerier_Expecter) GetProofForGER(ctx interface{}, ger interface{}, rootFromWhichToProve interface{}) *L1InfoTreeDataQuerier_GetProofForGER_Call {
	return &L1InfoTreeDataQuerier_GetProofForGER_Call{Call: _e.mock.On("GetProofForGER", ctx, ger, rootFromWhichToProve)}
}

func (_c *L1InfoTreeDataQuerier_GetProofForGER_Call) Run(run func(ctx context.Context, ger common.Hash, rootFromWhichToProve common.Hash)) *L1InfoTreeDataQuerier_GetProofForGER_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Hash))
	})
	return _c
}

func (_c *L1InfoTreeDataQuerier_GetProofForGER_Call) Return(_a0 *l1infotreesync.L1InfoTreeLeaf, _a1 types.Proof, _a2 error) *L1InfoTreeDataQuerier_GetProofForGER_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

func (_c *L1InfoTreeDataQuerier_GetProofForGER_Call) RunAndReturn(run func(context.Context, common.Hash, common.Hash) (*l1infotreesync.L1InfoTreeLeaf, types.Proof, error)) *L1InfoTreeDataQuerier_GetProofForGER_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
