// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery

package mocks

import (
	"context"

	"github.com/chakchat/chakchat-backend/messaging-service/internal/domain"
	"github.com/chakchat/chakchat-backend/messaging-service/internal/domain/personal"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

// MockPersonalChatRepository is an autogenerated mock type for the PersonalChatRepository type
type MockPersonalChatRepository struct {
	mock.Mock
}

type MockPersonalChatRepository_Expecter struct {
	mock *mock.Mock
}

func (_m *MockPersonalChatRepository) EXPECT() *MockPersonalChatRepository_Expecter {
	return &MockPersonalChatRepository_Expecter{mock: &_m.Mock}
}

// Create provides a mock function for the type MockPersonalChatRepository
func (_mock *MockPersonalChatRepository) Create(context1 context.Context, personalChat *personal.PersonalChat) (*personal.PersonalChat, error) {
	ret := _mock.Called(context1, personalChat)

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

	var r0 *personal.PersonalChat
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *personal.PersonalChat) (*personal.PersonalChat, error)); ok {
		return returnFunc(context1, personalChat)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *personal.PersonalChat) *personal.PersonalChat); ok {
		r0 = returnFunc(context1, personalChat)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*personal.PersonalChat)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *personal.PersonalChat) error); ok {
		r1 = returnFunc(context1, personalChat)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Create is a helper method to define mock.On call
//   - context1
//   - personalChat
func (_e *MockPersonalChatRepository_Expecter) Create(context1 interface{}, personalChat interface{}) *MockPersonalChatRepository_Create_Call {
	return &MockPersonalChatRepository_Create_Call{Call: _e.mock.On("Create", context1, personalChat)}
}

func (_c *MockPersonalChatRepository_Create_Call) Run(run func(context1 context.Context, personalChat *personal.PersonalChat)) *MockPersonalChatRepository_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*personal.PersonalChat))
	})
	return _c
}

func (_c *MockPersonalChatRepository_Create_Call) Return(personalChat1 *personal.PersonalChat, err error) *MockPersonalChatRepository_Create_Call {
	_c.Call.Return(personalChat1, err)
	return _c
}

func (_c *MockPersonalChatRepository_Create_Call) RunAndReturn(run func(context1 context.Context, personalChat *personal.PersonalChat) (*personal.PersonalChat, error)) *MockPersonalChatRepository_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type MockPersonalChatRepository
func (_mock *MockPersonalChatRepository) Delete(context1 context.Context, chatID domain.ChatID) error {
	ret := _mock.Called(context1, chatID)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatID) error); ok {
		r0 = returnFunc(context1, chatID)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Delete is a helper method to define mock.On call
//   - context1
//   - chatID
func (_e *MockPersonalChatRepository_Expecter) Delete(context1 interface{}, chatID interface{}) *MockPersonalChatRepository_Delete_Call {
	return &MockPersonalChatRepository_Delete_Call{Call: _e.mock.On("Delete", context1, chatID)}
}

func (_c *MockPersonalChatRepository_Delete_Call) Run(run func(context1 context.Context, chatID domain.ChatID)) *MockPersonalChatRepository_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.ChatID))
	})
	return _c
}

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

func (_c *MockPersonalChatRepository_Delete_Call) RunAndReturn(run func(context1 context.Context, chatID domain.ChatID) error) *MockPersonalChatRepository_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// FindById provides a mock function for the type MockPersonalChatRepository
func (_mock *MockPersonalChatRepository) FindById(context1 context.Context, chatID domain.ChatID) (*personal.PersonalChat, error) {
	ret := _mock.Called(context1, chatID)

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

	var r0 *personal.PersonalChat
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatID) (*personal.PersonalChat, error)); ok {
		return returnFunc(context1, chatID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatID) *personal.PersonalChat); ok {
		r0 = returnFunc(context1, chatID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*personal.PersonalChat)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.ChatID) error); ok {
		r1 = returnFunc(context1, chatID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// FindById is a helper method to define mock.On call
//   - context1
//   - chatID
func (_e *MockPersonalChatRepository_Expecter) FindById(context1 interface{}, chatID interface{}) *MockPersonalChatRepository_FindById_Call {
	return &MockPersonalChatRepository_FindById_Call{Call: _e.mock.On("FindById", context1, chatID)}
}

func (_c *MockPersonalChatRepository_FindById_Call) Run(run func(context1 context.Context, chatID domain.ChatID)) *MockPersonalChatRepository_FindById_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.ChatID))
	})
	return _c
}

func (_c *MockPersonalChatRepository_FindById_Call) Return(personalChat *personal.PersonalChat, err error) *MockPersonalChatRepository_FindById_Call {
	_c.Call.Return(personalChat, err)
	return _c
}

func (_c *MockPersonalChatRepository_FindById_Call) RunAndReturn(run func(context1 context.Context, chatID domain.ChatID) (*personal.PersonalChat, error)) *MockPersonalChatRepository_FindById_Call {
	_c.Call.Return(run)
	return _c
}

// FindByMembers provides a mock function for the type MockPersonalChatRepository
func (_mock *MockPersonalChatRepository) FindByMembers(context1 context.Context, userIDs [2]domain.UserID) (*personal.PersonalChat, error) {
	ret := _mock.Called(context1, userIDs)

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

	var r0 *personal.PersonalChat
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, [2]domain.UserID) (*personal.PersonalChat, error)); ok {
		return returnFunc(context1, userIDs)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, [2]domain.UserID) *personal.PersonalChat); ok {
		r0 = returnFunc(context1, userIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*personal.PersonalChat)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, [2]domain.UserID) error); ok {
		r1 = returnFunc(context1, userIDs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// FindByMembers is a helper method to define mock.On call
//   - context1
//   - userIDs
func (_e *MockPersonalChatRepository_Expecter) FindByMembers(context1 interface{}, userIDs interface{}) *MockPersonalChatRepository_FindByMembers_Call {
	return &MockPersonalChatRepository_FindByMembers_Call{Call: _e.mock.On("FindByMembers", context1, userIDs)}
}

func (_c *MockPersonalChatRepository_FindByMembers_Call) Run(run func(context1 context.Context, userIDs [2]domain.UserID)) *MockPersonalChatRepository_FindByMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].([2]domain.UserID))
	})
	return _c
}

func (_c *MockPersonalChatRepository_FindByMembers_Call) Return(personalChat *personal.PersonalChat, err error) *MockPersonalChatRepository_FindByMembers_Call {
	_c.Call.Return(personalChat, err)
	return _c
}

func (_c *MockPersonalChatRepository_FindByMembers_Call) RunAndReturn(run func(context1 context.Context, userIDs [2]domain.UserID) (*personal.PersonalChat, error)) *MockPersonalChatRepository_FindByMembers_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function for the type MockPersonalChatRepository
func (_mock *MockPersonalChatRepository) Update(context1 context.Context, personalChat *personal.PersonalChat) (*personal.PersonalChat, error) {
	ret := _mock.Called(context1, personalChat)

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

	var r0 *personal.PersonalChat
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *personal.PersonalChat) (*personal.PersonalChat, error)); ok {
		return returnFunc(context1, personalChat)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *personal.PersonalChat) *personal.PersonalChat); ok {
		r0 = returnFunc(context1, personalChat)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*personal.PersonalChat)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *personal.PersonalChat) error); ok {
		r1 = returnFunc(context1, personalChat)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Update is a helper method to define mock.On call
//   - context1
//   - personalChat
func (_e *MockPersonalChatRepository_Expecter) Update(context1 interface{}, personalChat interface{}) *MockPersonalChatRepository_Update_Call {
	return &MockPersonalChatRepository_Update_Call{Call: _e.mock.On("Update", context1, personalChat)}
}

func (_c *MockPersonalChatRepository_Update_Call) Run(run func(context1 context.Context, personalChat *personal.PersonalChat)) *MockPersonalChatRepository_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*personal.PersonalChat))
	})
	return _c
}

func (_c *MockPersonalChatRepository_Update_Call) Return(personalChat1 *personal.PersonalChat, err error) *MockPersonalChatRepository_Update_Call {
	_c.Call.Return(personalChat1, err)
	return _c
}

func (_c *MockPersonalChatRepository_Update_Call) RunAndReturn(run func(context1 context.Context, personalChat *personal.PersonalChat) (*personal.PersonalChat, error)) *MockPersonalChatRepository_Update_Call {
	_c.Call.Return(run)
	return _c
}
