// Code generated by mockery v2.48.0. DO NOT EDIT.

package database

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	database "opencsg.com/csghub-server/builder/store/database"
)

// MockPromptStore is an autogenerated mock type for the PromptStore type
type MockPromptStore struct {
	mock.Mock
}

type MockPromptStore_Expecter struct {
	mock *mock.Mock
}

func (_m *MockPromptStore) EXPECT() *MockPromptStore_Expecter {
	return &MockPromptStore_Expecter{mock: &_m.Mock}
}

// ByOrgPath provides a mock function with given fields: ctx, namespace, per, page, onlyPublic
func (_m *MockPromptStore) ByOrgPath(ctx context.Context, namespace string, per int, page int, onlyPublic bool) ([]database.Prompt, int, error) {
	ret := _m.Called(ctx, namespace, per, page, onlyPublic)

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

	var r0 []database.Prompt
	var r1 int
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context, string, int, int, bool) ([]database.Prompt, int, error)); ok {
		return rf(ctx, namespace, per, page, onlyPublic)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, int, int, bool) []database.Prompt); ok {
		r0 = rf(ctx, namespace, per, page, onlyPublic)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Prompt)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, int, int, bool) int); ok {
		r1 = rf(ctx, namespace, per, page, onlyPublic)
	} else {
		r1 = ret.Get(1).(int)
	}

	if rf, ok := ret.Get(2).(func(context.Context, string, int, int, bool) error); ok {
		r2 = rf(ctx, namespace, per, page, onlyPublic)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// ByOrgPath is a helper method to define mock.On call
//   - ctx context.Context
//   - namespace string
//   - per int
//   - page int
//   - onlyPublic bool
func (_e *MockPromptStore_Expecter) ByOrgPath(ctx interface{}, namespace interface{}, per interface{}, page interface{}, onlyPublic interface{}) *MockPromptStore_ByOrgPath_Call {
	return &MockPromptStore_ByOrgPath_Call{Call: _e.mock.On("ByOrgPath", ctx, namespace, per, page, onlyPublic)}
}

func (_c *MockPromptStore_ByOrgPath_Call) Run(run func(ctx context.Context, namespace string, per int, page int, onlyPublic bool)) *MockPromptStore_ByOrgPath_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(int), args[3].(int), args[4].(bool))
	})
	return _c
}

func (_c *MockPromptStore_ByOrgPath_Call) Return(prompts []database.Prompt, total int, err error) *MockPromptStore_ByOrgPath_Call {
	_c.Call.Return(prompts, total, err)
	return _c
}

func (_c *MockPromptStore_ByOrgPath_Call) RunAndReturn(run func(context.Context, string, int, int, bool) ([]database.Prompt, int, error)) *MockPromptStore_ByOrgPath_Call {
	_c.Call.Return(run)
	return _c
}

// ByRepoID provides a mock function with given fields: ctx, repoID
func (_m *MockPromptStore) ByRepoID(ctx context.Context, repoID int64) (*database.Prompt, error) {
	ret := _m.Called(ctx, repoID)

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

	var r0 *database.Prompt
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) (*database.Prompt, error)); ok {
		return rf(ctx, repoID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64) *database.Prompt); ok {
		r0 = rf(ctx, repoID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*database.Prompt)
		}
	}

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

	return r0, r1
}

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

// ByRepoID is a helper method to define mock.On call
//   - ctx context.Context
//   - repoID int64
func (_e *MockPromptStore_Expecter) ByRepoID(ctx interface{}, repoID interface{}) *MockPromptStore_ByRepoID_Call {
	return &MockPromptStore_ByRepoID_Call{Call: _e.mock.On("ByRepoID", ctx, repoID)}
}

func (_c *MockPromptStore_ByRepoID_Call) Run(run func(ctx context.Context, repoID int64)) *MockPromptStore_ByRepoID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64))
	})
	return _c
}

func (_c *MockPromptStore_ByRepoID_Call) Return(_a0 *database.Prompt, _a1 error) *MockPromptStore_ByRepoID_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockPromptStore_ByRepoID_Call) RunAndReturn(run func(context.Context, int64) (*database.Prompt, error)) *MockPromptStore_ByRepoID_Call {
	_c.Call.Return(run)
	return _c
}

// ByRepoIDs provides a mock function with given fields: ctx, repoIDs
func (_m *MockPromptStore) ByRepoIDs(ctx context.Context, repoIDs []int64) ([]database.Prompt, error) {
	ret := _m.Called(ctx, repoIDs)

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

	var r0 []database.Prompt
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, []int64) ([]database.Prompt, error)); ok {
		return rf(ctx, repoIDs)
	}
	if rf, ok := ret.Get(0).(func(context.Context, []int64) []database.Prompt); ok {
		r0 = rf(ctx, repoIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Prompt)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, []int64) error); ok {
		r1 = rf(ctx, repoIDs)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// ByRepoIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - repoIDs []int64
func (_e *MockPromptStore_Expecter) ByRepoIDs(ctx interface{}, repoIDs interface{}) *MockPromptStore_ByRepoIDs_Call {
	return &MockPromptStore_ByRepoIDs_Call{Call: _e.mock.On("ByRepoIDs", ctx, repoIDs)}
}

func (_c *MockPromptStore_ByRepoIDs_Call) Run(run func(ctx context.Context, repoIDs []int64)) *MockPromptStore_ByRepoIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].([]int64))
	})
	return _c
}

func (_c *MockPromptStore_ByRepoIDs_Call) Return(prompts []database.Prompt, err error) *MockPromptStore_ByRepoIDs_Call {
	_c.Call.Return(prompts, err)
	return _c
}

func (_c *MockPromptStore_ByRepoIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]database.Prompt, error)) *MockPromptStore_ByRepoIDs_Call {
	_c.Call.Return(run)
	return _c
}

// ByUsername provides a mock function with given fields: ctx, username, per, page, onlyPublic
func (_m *MockPromptStore) ByUsername(ctx context.Context, username string, per int, page int, onlyPublic bool) ([]database.Prompt, int, error) {
	ret := _m.Called(ctx, username, per, page, onlyPublic)

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

	var r0 []database.Prompt
	var r1 int
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context, string, int, int, bool) ([]database.Prompt, int, error)); ok {
		return rf(ctx, username, per, page, onlyPublic)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, int, int, bool) []database.Prompt); ok {
		r0 = rf(ctx, username, per, page, onlyPublic)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Prompt)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, int, int, bool) int); ok {
		r1 = rf(ctx, username, per, page, onlyPublic)
	} else {
		r1 = ret.Get(1).(int)
	}

	if rf, ok := ret.Get(2).(func(context.Context, string, int, int, bool) error); ok {
		r2 = rf(ctx, username, per, page, onlyPublic)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// ByUsername is a helper method to define mock.On call
//   - ctx context.Context
//   - username string
//   - per int
//   - page int
//   - onlyPublic bool
func (_e *MockPromptStore_Expecter) ByUsername(ctx interface{}, username interface{}, per interface{}, page interface{}, onlyPublic interface{}) *MockPromptStore_ByUsername_Call {
	return &MockPromptStore_ByUsername_Call{Call: _e.mock.On("ByUsername", ctx, username, per, page, onlyPublic)}
}

func (_c *MockPromptStore_ByUsername_Call) Run(run func(ctx context.Context, username string, per int, page int, onlyPublic bool)) *MockPromptStore_ByUsername_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(int), args[3].(int), args[4].(bool))
	})
	return _c
}

func (_c *MockPromptStore_ByUsername_Call) Return(prompts []database.Prompt, total int, err error) *MockPromptStore_ByUsername_Call {
	_c.Call.Return(prompts, total, err)
	return _c
}

func (_c *MockPromptStore_ByUsername_Call) RunAndReturn(run func(context.Context, string, int, int, bool) ([]database.Prompt, int, error)) *MockPromptStore_ByUsername_Call {
	_c.Call.Return(run)
	return _c
}

// Create provides a mock function with given fields: ctx, input
func (_m *MockPromptStore) Create(ctx context.Context, input database.Prompt) (*database.Prompt, error) {
	ret := _m.Called(ctx, input)

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

	var r0 *database.Prompt
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, database.Prompt) (*database.Prompt, error)); ok {
		return rf(ctx, input)
	}
	if rf, ok := ret.Get(0).(func(context.Context, database.Prompt) *database.Prompt); ok {
		r0 = rf(ctx, input)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*database.Prompt)
		}
	}

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

	return r0, r1
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - input database.Prompt
func (_e *MockPromptStore_Expecter) Create(ctx interface{}, input interface{}) *MockPromptStore_Create_Call {
	return &MockPromptStore_Create_Call{Call: _e.mock.On("Create", ctx, input)}
}

func (_c *MockPromptStore_Create_Call) Run(run func(ctx context.Context, input database.Prompt)) *MockPromptStore_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(database.Prompt))
	})
	return _c
}

func (_c *MockPromptStore_Create_Call) Return(_a0 *database.Prompt, _a1 error) *MockPromptStore_Create_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockPromptStore_Create_Call) RunAndReturn(run func(context.Context, database.Prompt) (*database.Prompt, error)) *MockPromptStore_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function with given fields: ctx, input
func (_m *MockPromptStore) Delete(ctx context.Context, input database.Prompt) error {
	ret := _m.Called(ctx, input)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, database.Prompt) error); ok {
		r0 = rf(ctx, input)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - input database.Prompt
func (_e *MockPromptStore_Expecter) Delete(ctx interface{}, input interface{}) *MockPromptStore_Delete_Call {
	return &MockPromptStore_Delete_Call{Call: _e.mock.On("Delete", ctx, input)}
}

func (_c *MockPromptStore_Delete_Call) Run(run func(ctx context.Context, input database.Prompt)) *MockPromptStore_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(database.Prompt))
	})
	return _c
}

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

func (_c *MockPromptStore_Delete_Call) RunAndReturn(run func(context.Context, database.Prompt) error) *MockPromptStore_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// FindByPath provides a mock function with given fields: ctx, namespace, repoPath
func (_m *MockPromptStore) FindByPath(ctx context.Context, namespace string, repoPath string) (*database.Prompt, error) {
	ret := _m.Called(ctx, namespace, repoPath)

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

	var r0 *database.Prompt
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*database.Prompt, error)); ok {
		return rf(ctx, namespace, repoPath)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *database.Prompt); ok {
		r0 = rf(ctx, namespace, repoPath)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*database.Prompt)
		}
	}

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

	return r0, r1
}

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

// FindByPath is a helper method to define mock.On call
//   - ctx context.Context
//   - namespace string
//   - repoPath string
func (_e *MockPromptStore_Expecter) FindByPath(ctx interface{}, namespace interface{}, repoPath interface{}) *MockPromptStore_FindByPath_Call {
	return &MockPromptStore_FindByPath_Call{Call: _e.mock.On("FindByPath", ctx, namespace, repoPath)}
}

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

func (_c *MockPromptStore_FindByPath_Call) Return(_a0 *database.Prompt, _a1 error) *MockPromptStore_FindByPath_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

// Update provides a mock function with given fields: ctx, input
func (_m *MockPromptStore) Update(ctx context.Context, input database.Prompt) error {
	ret := _m.Called(ctx, input)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, database.Prompt) error); ok {
		r0 = rf(ctx, input)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - input database.Prompt
func (_e *MockPromptStore_Expecter) Update(ctx interface{}, input interface{}) *MockPromptStore_Update_Call {
	return &MockPromptStore_Update_Call{Call: _e.mock.On("Update", ctx, input)}
}

func (_c *MockPromptStore_Update_Call) Run(run func(ctx context.Context, input database.Prompt)) *MockPromptStore_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(database.Prompt))
	})
	return _c
}

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

func (_c *MockPromptStore_Update_Call) RunAndReturn(run func(context.Context, database.Prompt) error) *MockPromptStore_Update_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
