// Code generated by mockery. DO NOT EDIT.

package mock_database

import (
	database "github.com/anyproto/anytype-heart/pkg/lib/database"
	mock "github.com/stretchr/testify/mock"
)

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

type MockWithNestedFilter_Expecter struct {
	mock *mock.Mock
}

func (_m *MockWithNestedFilter) EXPECT() *MockWithNestedFilter_Expecter {
	return &MockWithNestedFilter_Expecter{mock: &_m.Mock}
}

// IterateNestedFilters provides a mock function with given fields: _a0
func (_m *MockWithNestedFilter) IterateNestedFilters(_a0 func(database.Filter) error) error {
	ret := _m.Called(_a0)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(func(database.Filter) error) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// IterateNestedFilters is a helper method to define mock.On call
//   - _a0 func(database.Filter) error
func (_e *MockWithNestedFilter_Expecter) IterateNestedFilters(_a0 interface{}) *MockWithNestedFilter_IterateNestedFilters_Call {
	return &MockWithNestedFilter_IterateNestedFilters_Call{Call: _e.mock.On("IterateNestedFilters", _a0)}
}

func (_c *MockWithNestedFilter_IterateNestedFilters_Call) Run(run func(_a0 func(database.Filter) error)) *MockWithNestedFilter_IterateNestedFilters_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(func(database.Filter) error))
	})
	return _c
}

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

func (_c *MockWithNestedFilter_IterateNestedFilters_Call) RunAndReturn(run func(func(database.Filter) error) error) *MockWithNestedFilter_IterateNestedFilters_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
