// Code generated by mockery v2.53.3. DO NOT EDIT.

package mocks

import (
	blockchain "github.com/ChainSafe/gossamer/internal/primitives/blockchain"
	generic "github.com/ChainSafe/gossamer/internal/primitives/runtime/generic"

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

	runtime "github.com/ChainSafe/gossamer/internal/primitives/runtime"
)

// HeaderBackend is an autogenerated mock type for the HeaderBackend type
type HeaderBackend[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	mock.Mock
}

type HeaderBackend_Expecter[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	mock *mock.Mock
}

func (_m *HeaderBackend[Hash, N, Header]) EXPECT() *HeaderBackend_Expecter[Hash, N, Header] {
	return &HeaderBackend_Expecter[Hash, N, Header]{mock: &_m.Mock}
}

// BlockHashFromID provides a mock function with given fields: id
func (_m *HeaderBackend[Hash, N, Header]) BlockHashFromID(id generic.BlockID) (*Hash, error) {
	ret := _m.Called(id)

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

	var r0 *Hash
	var r1 error
	if rf, ok := ret.Get(0).(func(generic.BlockID) (*Hash, error)); ok {
		return rf(id)
	}
	if rf, ok := ret.Get(0).(func(generic.BlockID) *Hash); ok {
		r0 = rf(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*Hash)
		}
	}

	if rf, ok := ret.Get(1).(func(generic.BlockID) error); ok {
		r1 = rf(id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// HeaderBackend_BlockHashFromID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockHashFromID'
type HeaderBackend_BlockHashFromID_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// BlockHashFromID is a helper method to define mock.On call
//   - id generic.BlockID
func (_e *HeaderBackend_Expecter[Hash, N, Header]) BlockHashFromID(id interface{}) *HeaderBackend_BlockHashFromID_Call[Hash, N, Header] {
	return &HeaderBackend_BlockHashFromID_Call[Hash, N, Header]{Call: _e.mock.On("BlockHashFromID", id)}
}

func (_c *HeaderBackend_BlockHashFromID_Call[Hash, N, Header]) Run(run func(id generic.BlockID)) *HeaderBackend_BlockHashFromID_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(generic.BlockID))
	})
	return _c
}

func (_c *HeaderBackend_BlockHashFromID_Call[Hash, N, Header]) Return(_a0 *Hash, _a1 error) *HeaderBackend_BlockHashFromID_Call[Hash, N, Header] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *HeaderBackend_BlockHashFromID_Call[Hash, N, Header]) RunAndReturn(run func(generic.BlockID) (*Hash, error)) *HeaderBackend_BlockHashFromID_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// BlockNumberFromID provides a mock function with given fields: id
func (_m *HeaderBackend[Hash, N, Header]) BlockNumberFromID(id generic.BlockID) (*N, error) {
	ret := _m.Called(id)

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

	var r0 *N
	var r1 error
	if rf, ok := ret.Get(0).(func(generic.BlockID) (*N, error)); ok {
		return rf(id)
	}
	if rf, ok := ret.Get(0).(func(generic.BlockID) *N); ok {
		r0 = rf(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*N)
		}
	}

	if rf, ok := ret.Get(1).(func(generic.BlockID) error); ok {
		r1 = rf(id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// HeaderBackend_BlockNumberFromID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockNumberFromID'
type HeaderBackend_BlockNumberFromID_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// BlockNumberFromID is a helper method to define mock.On call
//   - id generic.BlockID
func (_e *HeaderBackend_Expecter[Hash, N, Header]) BlockNumberFromID(id interface{}) *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header] {
	return &HeaderBackend_BlockNumberFromID_Call[Hash, N, Header]{Call: _e.mock.On("BlockNumberFromID", id)}
}

func (_c *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header]) Run(run func(id generic.BlockID)) *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(generic.BlockID))
	})
	return _c
}

func (_c *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header]) Return(_a0 *N, _a1 error) *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header]) RunAndReturn(run func(generic.BlockID) (*N, error)) *HeaderBackend_BlockNumberFromID_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// Hash provides a mock function with given fields: number
func (_m *HeaderBackend[Hash, N, Header]) Hash(number N) (*Hash, error) {
	ret := _m.Called(number)

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

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

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

	return r0, r1
}

// HeaderBackend_Hash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hash'
type HeaderBackend_Hash_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// Hash is a helper method to define mock.On call
//   - number N
func (_e *HeaderBackend_Expecter[Hash, N, Header]) Hash(number interface{}) *HeaderBackend_Hash_Call[Hash, N, Header] {
	return &HeaderBackend_Hash_Call[Hash, N, Header]{Call: _e.mock.On("Hash", number)}
}

func (_c *HeaderBackend_Hash_Call[Hash, N, Header]) Run(run func(number N)) *HeaderBackend_Hash_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(N))
	})
	return _c
}

func (_c *HeaderBackend_Hash_Call[Hash, N, Header]) Return(_a0 *Hash, _a1 error) *HeaderBackend_Hash_Call[Hash, N, Header] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *HeaderBackend_Hash_Call[Hash, N, Header]) RunAndReturn(run func(N) (*Hash, error)) *HeaderBackend_Hash_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// Header provides a mock function with given fields: hash
func (_m *HeaderBackend[Hash, N, Header]) Header(hash Hash) (*Header, error) {
	ret := _m.Called(hash)

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

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

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

	return r0, r1
}

// HeaderBackend_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header'
type HeaderBackend_Header_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// Header is a helper method to define mock.On call
//   - hash Hash
func (_e *HeaderBackend_Expecter[Hash, N, Header]) Header(hash interface{}) *HeaderBackend_Header_Call[Hash, N, Header] {
	return &HeaderBackend_Header_Call[Hash, N, Header]{Call: _e.mock.On("Header", hash)}
}

func (_c *HeaderBackend_Header_Call[Hash, N, Header]) Run(run func(hash Hash)) *HeaderBackend_Header_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(Hash))
	})
	return _c
}

func (_c *HeaderBackend_Header_Call[Hash, N, Header]) Return(_a0 *Header, _a1 error) *HeaderBackend_Header_Call[Hash, N, Header] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *HeaderBackend_Header_Call[Hash, N, Header]) RunAndReturn(run func(Hash) (*Header, error)) *HeaderBackend_Header_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// Info provides a mock function with no fields
func (_m *HeaderBackend[Hash, N, Header]) Info() blockchain.Info[Hash, N] {
	ret := _m.Called()

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

	var r0 blockchain.Info[Hash, N]
	if rf, ok := ret.Get(0).(func() blockchain.Info[Hash, N]); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(blockchain.Info[Hash, N])
	}

	return r0
}

// HeaderBackend_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'
type HeaderBackend_Info_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// Info is a helper method to define mock.On call
func (_e *HeaderBackend_Expecter[Hash, N, Header]) Info() *HeaderBackend_Info_Call[Hash, N, Header] {
	return &HeaderBackend_Info_Call[Hash, N, Header]{Call: _e.mock.On("Info")}
}

func (_c *HeaderBackend_Info_Call[Hash, N, Header]) Run(run func()) *HeaderBackend_Info_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *HeaderBackend_Info_Call[Hash, N, Header]) Return(_a0 blockchain.Info[Hash, N]) *HeaderBackend_Info_Call[Hash, N, Header] {
	_c.Call.Return(_a0)
	return _c
}

func (_c *HeaderBackend_Info_Call[Hash, N, Header]) RunAndReturn(run func() blockchain.Info[Hash, N]) *HeaderBackend_Info_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// Number provides a mock function with given fields: hash
func (_m *HeaderBackend[Hash, N, Header]) Number(hash Hash) (*N, error) {
	ret := _m.Called(hash)

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

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

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

	return r0, r1
}

// HeaderBackend_Number_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Number'
type HeaderBackend_Number_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// Number is a helper method to define mock.On call
//   - hash Hash
func (_e *HeaderBackend_Expecter[Hash, N, Header]) Number(hash interface{}) *HeaderBackend_Number_Call[Hash, N, Header] {
	return &HeaderBackend_Number_Call[Hash, N, Header]{Call: _e.mock.On("Number", hash)}
}

func (_c *HeaderBackend_Number_Call[Hash, N, Header]) Run(run func(hash Hash)) *HeaderBackend_Number_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(Hash))
	})
	return _c
}

func (_c *HeaderBackend_Number_Call[Hash, N, Header]) Return(_a0 *N, _a1 error) *HeaderBackend_Number_Call[Hash, N, Header] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *HeaderBackend_Number_Call[Hash, N, Header]) RunAndReturn(run func(Hash) (*N, error)) *HeaderBackend_Number_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// Status provides a mock function with given fields: hash
func (_m *HeaderBackend[Hash, N, Header]) Status(hash Hash) (blockchain.BlockStatus, error) {
	ret := _m.Called(hash)

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

	var r0 blockchain.BlockStatus
	var r1 error
	if rf, ok := ret.Get(0).(func(Hash) (blockchain.BlockStatus, error)); ok {
		return rf(hash)
	}
	if rf, ok := ret.Get(0).(func(Hash) blockchain.BlockStatus); ok {
		r0 = rf(hash)
	} else {
		r0 = ret.Get(0).(blockchain.BlockStatus)
	}

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

	return r0, r1
}

// HeaderBackend_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'
type HeaderBackend_Status_Call[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]] struct {
	*mock.Call
}

// Status is a helper method to define mock.On call
//   - hash Hash
func (_e *HeaderBackend_Expecter[Hash, N, Header]) Status(hash interface{}) *HeaderBackend_Status_Call[Hash, N, Header] {
	return &HeaderBackend_Status_Call[Hash, N, Header]{Call: _e.mock.On("Status", hash)}
}

func (_c *HeaderBackend_Status_Call[Hash, N, Header]) Run(run func(hash Hash)) *HeaderBackend_Status_Call[Hash, N, Header] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(Hash))
	})
	return _c
}

func (_c *HeaderBackend_Status_Call[Hash, N, Header]) Return(_a0 blockchain.BlockStatus, _a1 error) *HeaderBackend_Status_Call[Hash, N, Header] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *HeaderBackend_Status_Call[Hash, N, Header]) RunAndReturn(run func(Hash) (blockchain.BlockStatus, error)) *HeaderBackend_Status_Call[Hash, N, Header] {
	_c.Call.Return(run)
	return _c
}

// NewHeaderBackend creates a new instance of HeaderBackend. 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 NewHeaderBackend[Hash runtime.Hash, N runtime.Number, Header runtime.Header[N, Hash]](t interface {
	mock.TestingT
	Cleanup(func())
}) *HeaderBackend[Hash, N, Header] {
	mock := &HeaderBackend[Hash, N, Header]{}
	mock.Mock.Test(t)

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

	return mock
}
