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

package mocks

import (
	context "context"

	chains "github.com/smartcontractkit/chainlink-framework/chains"

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

// KeyStore is an autogenerated mock type for the KeyStore type
type KeyStore[ADDR chains.Hashable] struct {
	mock.Mock
}

type KeyStore_Expecter[ADDR chains.Hashable] struct {
	mock *mock.Mock
}

func (_m *KeyStore[ADDR]) EXPECT() *KeyStore_Expecter[ADDR] {
	return &KeyStore_Expecter[ADDR]{mock: &_m.Mock}
}

// CheckEnabled provides a mock function with given fields: ctx, address
func (_m *KeyStore[ADDR]) CheckEnabled(ctx context.Context, address ADDR) error {
	ret := _m.Called(ctx, address)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, ADDR) error); ok {
		r0 = rf(ctx, address)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// KeyStore_CheckEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEnabled'
type KeyStore_CheckEnabled_Call[ADDR chains.Hashable] struct {
	*mock.Call
}

// CheckEnabled is a helper method to define mock.On call
//   - ctx context.Context
//   - address ADDR
func (_e *KeyStore_Expecter[ADDR]) CheckEnabled(ctx interface{}, address interface{}) *KeyStore_CheckEnabled_Call[ADDR] {
	return &KeyStore_CheckEnabled_Call[ADDR]{Call: _e.mock.On("CheckEnabled", ctx, address)}
}

func (_c *KeyStore_CheckEnabled_Call[ADDR]) Run(run func(ctx context.Context, address ADDR)) *KeyStore_CheckEnabled_Call[ADDR] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(ADDR))
	})
	return _c
}

func (_c *KeyStore_CheckEnabled_Call[ADDR]) Return(_a0 error) *KeyStore_CheckEnabled_Call[ADDR] {
	_c.Call.Return(_a0)
	return _c
}

func (_c *KeyStore_CheckEnabled_Call[ADDR]) RunAndReturn(run func(context.Context, ADDR) error) *KeyStore_CheckEnabled_Call[ADDR] {
	_c.Call.Return(run)
	return _c
}

// EnabledAddresses provides a mock function with given fields: ctx
func (_m *KeyStore[ADDR]) EnabledAddresses(ctx context.Context) ([]ADDR, error) {
	ret := _m.Called(ctx)

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

	var r0 []ADDR
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) ([]ADDR, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) []ADDR); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]ADDR)
		}
	}

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

	return r0, r1
}

// KeyStore_EnabledAddresses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnabledAddresses'
type KeyStore_EnabledAddresses_Call[ADDR chains.Hashable] struct {
	*mock.Call
}

// EnabledAddresses is a helper method to define mock.On call
//   - ctx context.Context
func (_e *KeyStore_Expecter[ADDR]) EnabledAddresses(ctx interface{}) *KeyStore_EnabledAddresses_Call[ADDR] {
	return &KeyStore_EnabledAddresses_Call[ADDR]{Call: _e.mock.On("EnabledAddresses", ctx)}
}

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

func (_c *KeyStore_EnabledAddresses_Call[ADDR]) Return(_a0 []ADDR, _a1 error) *KeyStore_EnabledAddresses_Call[ADDR] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *KeyStore_EnabledAddresses_Call[ADDR]) RunAndReturn(run func(context.Context) ([]ADDR, error)) *KeyStore_EnabledAddresses_Call[ADDR] {
	_c.Call.Return(run)
	return _c
}

// NewKeyStore creates a new instance of KeyStore. 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 NewKeyStore[ADDR chains.Hashable](t interface {
	mock.TestingT
	Cleanup(func())
}) *KeyStore[ADDR] {
	mock := &KeyStore[ADDR]{}
	mock.Mock.Test(t)

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

	return mock
}
