// Code generated by mockery. DO NOT EDIT.

package mock_cache

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

	context "context"

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

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

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

// MockObjectWaitGetterComponent is an autogenerated mock type for the ObjectWaitGetterComponent type
type MockObjectWaitGetterComponent struct {
	mock.Mock
}

type MockObjectWaitGetterComponent_Expecter struct {
	mock *mock.Mock
}

func (_m *MockObjectWaitGetterComponent) EXPECT() *MockObjectWaitGetterComponent_Expecter {
	return &MockObjectWaitGetterComponent_Expecter{mock: &_m.Mock}
}

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

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

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

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

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

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

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

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

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

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

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

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

// WaitAndGetObject provides a mock function with given fields: ctx, objectID
func (_m *MockObjectWaitGetterComponent) WaitAndGetObject(ctx context.Context, objectID string) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, objectID)

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

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

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

	return r0, r1
}

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

// WaitAndGetObject is a helper method to define mock.On call
//   - ctx context.Context
//   - objectID string
func (_e *MockObjectWaitGetterComponent_Expecter) WaitAndGetObject(ctx interface{}, objectID interface{}) *MockObjectWaitGetterComponent_WaitAndGetObject_Call {
	return &MockObjectWaitGetterComponent_WaitAndGetObject_Call{Call: _e.mock.On("WaitAndGetObject", ctx, objectID)}
}

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

func (_c *MockObjectWaitGetterComponent_WaitAndGetObject_Call) Return(sb smartblock.SmartBlock, err error) *MockObjectWaitGetterComponent_WaitAndGetObject_Call {
	_c.Call.Return(sb, err)
	return _c
}

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

// WaitAndGetObjectByFullID provides a mock function with given fields: ctx, id
func (_m *MockObjectWaitGetterComponent) WaitAndGetObjectByFullID(ctx context.Context, id domain.FullID) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, id)

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

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) smartblock.SmartBlock); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

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

	return r0, r1
}

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

// WaitAndGetObjectByFullID is a helper method to define mock.On call
//   - ctx context.Context
//   - id domain.FullID
func (_e *MockObjectWaitGetterComponent_Expecter) WaitAndGetObjectByFullID(ctx interface{}, id interface{}) *MockObjectWaitGetterComponent_WaitAndGetObjectByFullID_Call {
	return &MockObjectWaitGetterComponent_WaitAndGetObjectByFullID_Call{Call: _e.mock.On("WaitAndGetObjectByFullID", ctx, id)}
}

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

func (_c *MockObjectWaitGetterComponent_WaitAndGetObjectByFullID_Call) Return(sb smartblock.SmartBlock, err error) *MockObjectWaitGetterComponent_WaitAndGetObjectByFullID_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockObjectWaitGetterComponent_WaitAndGetObjectByFullID_Call) RunAndReturn(run func(context.Context, domain.FullID) (smartblock.SmartBlock, error)) *MockObjectWaitGetterComponent_WaitAndGetObjectByFullID_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
