// Code generated by mockery. DO NOT EDIT.

package smartblock

import (
	context "context"

	app "github.com/anyproto/any-sync/app"

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

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

type MockIndexer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockIndexer) EXPECT() *MockIndexer_Expecter {
	return &MockIndexer_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with given fields: ctx
func (_m *MockIndexer) Close(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

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

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

func (_c *MockIndexer_Close_Call) Return(err error) *MockIndexer_Close_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockIndexer_Close_Call) RunAndReturn(run func(context.Context) error) *MockIndexer_Close_Call {
	_c.Call.Return(run)
	return _c
}

// Index provides a mock function with given fields: info, options
func (_m *MockIndexer) Index(info DocInfo, options ...IndexOption) error {
	_va := make([]interface{}, len(options))
	for _i := range options {
		_va[_i] = options[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, info)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(DocInfo, ...IndexOption) error); ok {
		r0 = rf(info, options...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Index is a helper method to define mock.On call
//   - info DocInfo
//   - options ...IndexOption
func (_e *MockIndexer_Expecter) Index(info interface{}, options ...interface{}) *MockIndexer_Index_Call {
	return &MockIndexer_Index_Call{Call: _e.mock.On("Index",
		append([]interface{}{info}, options...)...)}
}

func (_c *MockIndexer_Index_Call) Run(run func(info DocInfo, options ...IndexOption)) *MockIndexer_Index_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]IndexOption, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(IndexOption)
			}
		}
		run(args[0].(DocInfo), variadicArgs...)
	})
	return _c
}

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

func (_c *MockIndexer_Index_Call) RunAndReturn(run func(DocInfo, ...IndexOption) error) *MockIndexer_Index_Call {
	_c.Call.Return(run)
	return _c
}

// Init provides a mock function with given fields: a
func (_m *MockIndexer) Init(a *app.App) error {
	ret := _m.Called(a)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*app.App) error); ok {
		r0 = rf(a)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Init is a helper method to define mock.On call
//   - a *app.App
func (_e *MockIndexer_Expecter) Init(a interface{}) *MockIndexer_Init_Call {
	return &MockIndexer_Init_Call{Call: _e.mock.On("Init", a)}
}

func (_c *MockIndexer_Init_Call) Run(run func(a *app.App)) *MockIndexer_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*app.App))
	})
	return _c
}

func (_c *MockIndexer_Init_Call) Return(err error) *MockIndexer_Init_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockIndexer_Init_Call) RunAndReturn(run func(*app.App) error) *MockIndexer_Init_Call {
	_c.Call.Return(run)
	return _c
}

// Name provides a mock function with given fields:
func (_m *MockIndexer) Name() string {
	ret := _m.Called()

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

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

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

// Name is a helper method to define mock.On call
func (_e *MockIndexer_Expecter) Name() *MockIndexer_Name_Call {
	return &MockIndexer_Name_Call{Call: _e.mock.On("Name")}
}

func (_c *MockIndexer_Name_Call) Run(run func()) *MockIndexer_Name_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockIndexer_Name_Call) Return(name string) *MockIndexer_Name_Call {
	_c.Call.Return(name)
	return _c
}

func (_c *MockIndexer_Name_Call) RunAndReturn(run func() string) *MockIndexer_Name_Call {
	_c.Call.Return(run)
	return _c
}

// Run provides a mock function with given fields: ctx
func (_m *MockIndexer) Run(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

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

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

func (_c *MockIndexer_Run_Call) Return(err error) *MockIndexer_Run_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockIndexer_Run_Call) RunAndReturn(run func(context.Context) error) *MockIndexer_Run_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
