// Code generated by mockery. DO NOT EDIT.

package mock_template

import (
	context "context"

	app "github.com/anyproto/any-sync/app"
	clientspace "github.com/anyproto/anytype-heart/space/clientspace"

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

	smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock"

	state "github.com/anyproto/anytype-heart/core/block/editor/state"

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

// 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}
}

// CreateTemplateStateFromSmartBlock provides a mock function with given fields: sb, req
func (_m *MockService) CreateTemplateStateFromSmartBlock(sb smartblock.SmartBlock, req template.CreateTemplateRequest) *state.State {
	ret := _m.Called(sb, req)

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

	var r0 *state.State
	if rf, ok := ret.Get(0).(func(smartblock.SmartBlock, template.CreateTemplateRequest) *state.State); ok {
		r0 = rf(sb, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*state.State)
		}
	}

	return r0
}

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

// CreateTemplateStateFromSmartBlock is a helper method to define mock.On call
//   - sb smartblock.SmartBlock
//   - req template.CreateTemplateRequest
func (_e *MockService_Expecter) CreateTemplateStateFromSmartBlock(sb interface{}, req interface{}) *MockService_CreateTemplateStateFromSmartBlock_Call {
	return &MockService_CreateTemplateStateFromSmartBlock_Call{Call: _e.mock.On("CreateTemplateStateFromSmartBlock", sb, req)}
}

func (_c *MockService_CreateTemplateStateFromSmartBlock_Call) Run(run func(sb smartblock.SmartBlock, req template.CreateTemplateRequest)) *MockService_CreateTemplateStateFromSmartBlock_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(smartblock.SmartBlock), args[1].(template.CreateTemplateRequest))
	})
	return _c
}

func (_c *MockService_CreateTemplateStateFromSmartBlock_Call) Return(_a0 *state.State) *MockService_CreateTemplateStateFromSmartBlock_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockService_CreateTemplateStateFromSmartBlock_Call) RunAndReturn(run func(smartblock.SmartBlock, template.CreateTemplateRequest) *state.State) *MockService_CreateTemplateStateFromSmartBlock_Call {
	_c.Call.Return(run)
	return _c
}

// CreateTemplateStateWithDetails provides a mock function with given fields: req
func (_m *MockService) CreateTemplateStateWithDetails(req template.CreateTemplateRequest) (*state.State, error) {
	ret := _m.Called(req)

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

	var r0 *state.State
	var r1 error
	if rf, ok := ret.Get(0).(func(template.CreateTemplateRequest) (*state.State, error)); ok {
		return rf(req)
	}
	if rf, ok := ret.Get(0).(func(template.CreateTemplateRequest) *state.State); ok {
		r0 = rf(req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*state.State)
		}
	}

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

	return r0, r1
}

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

// CreateTemplateStateWithDetails is a helper method to define mock.On call
//   - req template.CreateTemplateRequest
func (_e *MockService_Expecter) CreateTemplateStateWithDetails(req interface{}) *MockService_CreateTemplateStateWithDetails_Call {
	return &MockService_CreateTemplateStateWithDetails_Call{Call: _e.mock.On("CreateTemplateStateWithDetails", req)}
}

func (_c *MockService_CreateTemplateStateWithDetails_Call) Run(run func(req template.CreateTemplateRequest)) *MockService_CreateTemplateStateWithDetails_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(template.CreateTemplateRequest))
	})
	return _c
}

func (_c *MockService_CreateTemplateStateWithDetails_Call) Return(st *state.State, err error) *MockService_CreateTemplateStateWithDetails_Call {
	_c.Call.Return(st, err)
	return _c
}

func (_c *MockService_CreateTemplateStateWithDetails_Call) RunAndReturn(run func(template.CreateTemplateRequest) (*state.State, error)) *MockService_CreateTemplateStateWithDetails_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
}

// ObjectApplyTemplate provides a mock function with given fields: contextId, templateId
func (_m *MockService) ObjectApplyTemplate(contextId string, templateId string) error {
	ret := _m.Called(contextId, templateId)

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

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

	return r0
}

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

// ObjectApplyTemplate is a helper method to define mock.On call
//   - contextId string
//   - templateId string
func (_e *MockService_Expecter) ObjectApplyTemplate(contextId interface{}, templateId interface{}) *MockService_ObjectApplyTemplate_Call {
	return &MockService_ObjectApplyTemplate_Call{Call: _e.mock.On("ObjectApplyTemplate", contextId, templateId)}
}

func (_c *MockService_ObjectApplyTemplate_Call) Run(run func(contextId string, templateId string)) *MockService_ObjectApplyTemplate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string))
	})
	return _c
}

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

func (_c *MockService_ObjectApplyTemplate_Call) RunAndReturn(run func(string, string) error) *MockService_ObjectApplyTemplate_Call {
	_c.Call.Return(run)
	return _c
}

// TemplateClone provides a mock function with given fields: spaceId, id
func (_m *MockService) TemplateClone(spaceId string, id string) (string, error) {
	ret := _m.Called(spaceId, id)

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

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

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

	return r0, r1
}

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

// TemplateClone is a helper method to define mock.On call
//   - spaceId string
//   - id string
func (_e *MockService_Expecter) TemplateClone(spaceId interface{}, id interface{}) *MockService_TemplateClone_Call {
	return &MockService_TemplateClone_Call{Call: _e.mock.On("TemplateClone", spaceId, id)}
}

func (_c *MockService_TemplateClone_Call) Run(run func(spaceId string, id string)) *MockService_TemplateClone_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string))
	})
	return _c
}

func (_c *MockService_TemplateClone_Call) Return(templateId string, err error) *MockService_TemplateClone_Call {
	_c.Call.Return(templateId, err)
	return _c
}

func (_c *MockService_TemplateClone_Call) RunAndReturn(run func(string, string) (string, error)) *MockService_TemplateClone_Call {
	_c.Call.Return(run)
	return _c
}

// TemplateCloneInSpace provides a mock function with given fields: space, id
func (_m *MockService) TemplateCloneInSpace(space clientspace.Space, id string) (string, error) {
	ret := _m.Called(space, id)

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

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(clientspace.Space, string) (string, error)); ok {
		return rf(space, id)
	}
	if rf, ok := ret.Get(0).(func(clientspace.Space, string) string); ok {
		r0 = rf(space, id)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(clientspace.Space, string) error); ok {
		r1 = rf(space, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// TemplateCloneInSpace is a helper method to define mock.On call
//   - space clientspace.Space
//   - id string
func (_e *MockService_Expecter) TemplateCloneInSpace(space interface{}, id interface{}) *MockService_TemplateCloneInSpace_Call {
	return &MockService_TemplateCloneInSpace_Call{Call: _e.mock.On("TemplateCloneInSpace", space, id)}
}

func (_c *MockService_TemplateCloneInSpace_Call) Run(run func(space clientspace.Space, id string)) *MockService_TemplateCloneInSpace_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(clientspace.Space), args[1].(string))
	})
	return _c
}

func (_c *MockService_TemplateCloneInSpace_Call) Return(templateId string, err error) *MockService_TemplateCloneInSpace_Call {
	_c.Call.Return(templateId, err)
	return _c
}

func (_c *MockService_TemplateCloneInSpace_Call) RunAndReturn(run func(clientspace.Space, string) (string, error)) *MockService_TemplateCloneInSpace_Call {
	_c.Call.Return(run)
	return _c
}

// TemplateCreateFromObject provides a mock function with given fields: ctx, id
func (_m *MockService) TemplateCreateFromObject(ctx context.Context, id string) (string, error) {
	ret := _m.Called(ctx, id)

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

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

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

	return r0, r1
}

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

// TemplateCreateFromObject is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *MockService_Expecter) TemplateCreateFromObject(ctx interface{}, id interface{}) *MockService_TemplateCreateFromObject_Call {
	return &MockService_TemplateCreateFromObject_Call{Call: _e.mock.On("TemplateCreateFromObject", ctx, id)}
}

func (_c *MockService_TemplateCreateFromObject_Call) Run(run func(ctx context.Context, id string)) *MockService_TemplateCreateFromObject_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockService_TemplateCreateFromObject_Call) Return(templateId string, err error) *MockService_TemplateCreateFromObject_Call {
	_c.Call.Return(templateId, err)
	return _c
}

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

// TemplateExportAll provides a mock function with given fields: ctx, path
func (_m *MockService) TemplateExportAll(ctx context.Context, path string) (string, error) {
	ret := _m.Called(ctx, path)

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

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

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

	return r0, r1
}

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

// TemplateExportAll is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
func (_e *MockService_Expecter) TemplateExportAll(ctx interface{}, path interface{}) *MockService_TemplateExportAll_Call {
	return &MockService_TemplateExportAll_Call{Call: _e.mock.On("TemplateExportAll", ctx, path)}
}

func (_c *MockService_TemplateExportAll_Call) Run(run func(ctx context.Context, path string)) *MockService_TemplateExportAll_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockService_TemplateExportAll_Call) Return(_a0 string, _a1 error) *MockService_TemplateExportAll_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_TemplateExportAll_Call) RunAndReturn(run func(context.Context, string) (string, error)) *MockService_TemplateExportAll_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
}
