// Code generated by mockery. DO NOT EDIT.

package mock_source

import (
	context "context"

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

	domain "github.com/anyproto/anytype-heart/core/domain"

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

	smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock"

	source "github.com/anyproto/anytype-heart/core/block/source"
)

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

type MockService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockService) EXPECT() *MockService_Expecter {
	return &MockService_Expecter{mock: &_m.Mock}
}

// DetailsFromIdBasedSource provides a mock function with given fields: id
func (_m *MockService) DetailsFromIdBasedSource(id domain.FullID) (*domain.Details, error) {
	ret := _m.Called(id)

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

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

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

	return r0, r1
}

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

// DetailsFromIdBasedSource is a helper method to define mock.On call
//   - id domain.FullID
func (_e *MockService_Expecter) DetailsFromIdBasedSource(id interface{}) *MockService_DetailsFromIdBasedSource_Call {
	return &MockService_DetailsFromIdBasedSource_Call{Call: _e.mock.On("DetailsFromIdBasedSource", id)}
}

func (_c *MockService_DetailsFromIdBasedSource_Call) Run(run func(id domain.FullID)) *MockService_DetailsFromIdBasedSource_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(domain.FullID))
	})
	return _c
}

func (_c *MockService_DetailsFromIdBasedSource_Call) Return(_a0 *domain.Details, _a1 error) *MockService_DetailsFromIdBasedSource_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_DetailsFromIdBasedSource_Call) RunAndReturn(run func(domain.FullID) (*domain.Details, error)) *MockService_DetailsFromIdBasedSource_Call {
	_c.Call.Return(run)
	return _c
}

// IDsListerBySmartblockType provides a mock function with given fields: space, blockType
func (_m *MockService) IDsListerBySmartblockType(space source.Space, blockType smartblock.SmartBlockType) (source.IDsLister, error) {
	ret := _m.Called(space, blockType)

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

	var r0 source.IDsLister
	var r1 error
	if rf, ok := ret.Get(0).(func(source.Space, smartblock.SmartBlockType) (source.IDsLister, error)); ok {
		return rf(space, blockType)
	}
	if rf, ok := ret.Get(0).(func(source.Space, smartblock.SmartBlockType) source.IDsLister); ok {
		r0 = rf(space, blockType)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(source.IDsLister)
		}
	}

	if rf, ok := ret.Get(1).(func(source.Space, smartblock.SmartBlockType) error); ok {
		r1 = rf(space, blockType)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// IDsListerBySmartblockType is a helper method to define mock.On call
//   - space source.Space
//   - blockType smartblock.SmartBlockType
func (_e *MockService_Expecter) IDsListerBySmartblockType(space interface{}, blockType interface{}) *MockService_IDsListerBySmartblockType_Call {
	return &MockService_IDsListerBySmartblockType_Call{Call: _e.mock.On("IDsListerBySmartblockType", space, blockType)}
}

func (_c *MockService_IDsListerBySmartblockType_Call) Run(run func(space source.Space, blockType smartblock.SmartBlockType)) *MockService_IDsListerBySmartblockType_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(source.Space), args[1].(smartblock.SmartBlockType))
	})
	return _c
}

func (_c *MockService_IDsListerBySmartblockType_Call) Return(_a0 source.IDsLister, _a1 error) *MockService_IDsListerBySmartblockType_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_IDsListerBySmartblockType_Call) RunAndReturn(run func(source.Space, smartblock.SmartBlockType) (source.IDsLister, error)) *MockService_IDsListerBySmartblockType_Call {
	_c.Call.Return(run)
	return _c
}

// Init provides a mock function with given fields: a
func (_m *MockService) 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
}

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

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

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

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

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

// Name provides a mock function with given fields:
func (_m *MockService) 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
}

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

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

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

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

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

// NewSource provides a mock function with given fields: ctx, space, id, buildOptions
func (_m *MockService) NewSource(ctx context.Context, space source.Space, id string, buildOptions source.BuildOptions) (source.Source, error) {
	ret := _m.Called(ctx, space, id, buildOptions)

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

	var r0 source.Source
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, source.Space, string, source.BuildOptions) (source.Source, error)); ok {
		return rf(ctx, space, id, buildOptions)
	}
	if rf, ok := ret.Get(0).(func(context.Context, source.Space, string, source.BuildOptions) source.Source); ok {
		r0 = rf(ctx, space, id, buildOptions)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(source.Source)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, source.Space, string, source.BuildOptions) error); ok {
		r1 = rf(ctx, space, id, buildOptions)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// NewSource is a helper method to define mock.On call
//   - ctx context.Context
//   - space source.Space
//   - id string
//   - buildOptions source.BuildOptions
func (_e *MockService_Expecter) NewSource(ctx interface{}, space interface{}, id interface{}, buildOptions interface{}) *MockService_NewSource_Call {
	return &MockService_NewSource_Call{Call: _e.mock.On("NewSource", ctx, space, id, buildOptions)}
}

func (_c *MockService_NewSource_Call) Run(run func(ctx context.Context, space source.Space, id string, buildOptions source.BuildOptions)) *MockService_NewSource_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(source.Space), args[2].(string), args[3].(source.BuildOptions))
	})
	return _c
}

func (_c *MockService_NewSource_Call) Return(_a0 source.Source, err error) *MockService_NewSource_Call {
	_c.Call.Return(_a0, err)
	return _c
}

func (_c *MockService_NewSource_Call) RunAndReturn(run func(context.Context, source.Space, string, source.BuildOptions) (source.Source, error)) *MockService_NewSource_Call {
	_c.Call.Return(run)
	return _c
}

// NewStaticSource provides a mock function with given fields: params
func (_m *MockService) NewStaticSource(params source.StaticSourceParams) source.SourceWithType {
	ret := _m.Called(params)

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

	var r0 source.SourceWithType
	if rf, ok := ret.Get(0).(func(source.StaticSourceParams) source.SourceWithType); ok {
		r0 = rf(params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(source.SourceWithType)
		}
	}

	return r0
}

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

// NewStaticSource is a helper method to define mock.On call
//   - params source.StaticSourceParams
func (_e *MockService_Expecter) NewStaticSource(params interface{}) *MockService_NewStaticSource_Call {
	return &MockService_NewStaticSource_Call{Call: _e.mock.On("NewStaticSource", params)}
}

func (_c *MockService_NewStaticSource_Call) Run(run func(params source.StaticSourceParams)) *MockService_NewStaticSource_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(source.StaticSourceParams))
	})
	return _c
}

func (_c *MockService_NewStaticSource_Call) Return(_a0 source.SourceWithType) *MockService_NewStaticSource_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockService_NewStaticSource_Call) RunAndReturn(run func(source.StaticSourceParams) source.SourceWithType) *MockService_NewStaticSource_Call {
	_c.Call.Return(run)
	return _c
}

// RegisterStaticSource provides a mock function with given fields: s
func (_m *MockService) RegisterStaticSource(s source.Source) error {
	ret := _m.Called(s)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(source.Source) error); ok {
		r0 = rf(s)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// RegisterStaticSource is a helper method to define mock.On call
//   - s source.Source
func (_e *MockService_Expecter) RegisterStaticSource(s interface{}) *MockService_RegisterStaticSource_Call {
	return &MockService_RegisterStaticSource_Call{Call: _e.mock.On("RegisterStaticSource", s)}
}

func (_c *MockService_RegisterStaticSource_Call) Run(run func(s source.Source)) *MockService_RegisterStaticSource_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(source.Source))
	})
	return _c
}

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

func (_c *MockService_RegisterStaticSource_Call) RunAndReturn(run func(source.Source) error) *MockService_RegisterStaticSource_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
