// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq

package mocks

import (
	"context"
	"github.com/schmitthub/clawker/internal/config"
	"github.com/schmitthub/clawker/internal/project"
	"sync"
)

// Ensure, that ProjectManagerMock does implement project.ProjectManager.
// If this is not the case, regenerate this file with moq.
var _ project.ProjectManager = &ProjectManagerMock{}

// ProjectManagerMock is a mock implementation of project.ProjectManager.
//
//	func TestSomethingThatUsesProjectManager(t *testing.T) {
//
//		// make and configure a mocked project.ProjectManager
//		mockedProjectManager := &ProjectManagerMock{
//			CurrentProjectFunc: func(ctx context.Context) (project.Project, error) {
//				panic("mock out the CurrentProject method")
//			},
//			GetFunc: func(ctx context.Context, root string) (project.Project, error) {
//				panic("mock out the Get method")
//			},
//			ListFunc: func(ctx context.Context) ([]config.ProjectEntry, error) {
//				panic("mock out the List method")
//			},
//			ListProjectsFunc: func(ctx context.Context) ([]project.ProjectState, error) {
//				panic("mock out the ListProjects method")
//			},
//			ListWorktreesFunc: func(ctx context.Context) ([]project.WorktreeState, error) {
//				panic("mock out the ListWorktrees method")
//			},
//			RegisterFunc: func(ctx context.Context, name string, repoPath string) (project.Project, error) {
//				panic("mock out the Register method")
//			},
//			RemoveFunc: func(ctx context.Context, root string) error {
//				panic("mock out the Remove method")
//			},
//			ResolvePathFunc: func(ctx context.Context, cwd string) (project.Project, error) {
//				panic("mock out the ResolvePath method")
//			},
//			UpdateFunc: func(ctx context.Context, entry config.ProjectEntry) (project.Project, error) {
//				panic("mock out the Update method")
//			},
//		}
//
//		// use mockedProjectManager in code that requires project.ProjectManager
//		// and then make assertions.
//
//	}
type ProjectManagerMock struct {
	// CurrentProjectFunc mocks the CurrentProject method.
	CurrentProjectFunc func(ctx context.Context) (project.Project, error)

	// GetFunc mocks the Get method.
	GetFunc func(ctx context.Context, root string) (project.Project, error)

	// ListFunc mocks the List method.
	ListFunc func(ctx context.Context) ([]config.ProjectEntry, error)

	// ListProjectsFunc mocks the ListProjects method.
	ListProjectsFunc func(ctx context.Context) ([]project.ProjectState, error)

	// ListWorktreesFunc mocks the ListWorktrees method.
	ListWorktreesFunc func(ctx context.Context) ([]project.WorktreeState, error)

	// RegisterFunc mocks the Register method.
	RegisterFunc func(ctx context.Context, name string, repoPath string) (project.Project, error)

	// RemoveFunc mocks the Remove method.
	RemoveFunc func(ctx context.Context, root string) error

	// ResolvePathFunc mocks the ResolvePath method.
	ResolvePathFunc func(ctx context.Context, cwd string) (project.Project, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(ctx context.Context, entry config.ProjectEntry) (project.Project, error)

	// calls tracks calls to the methods.
	calls struct {
		// CurrentProject holds details about calls to the CurrentProject method.
		CurrentProject []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// Get holds details about calls to the Get method.
		Get []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Root is the root argument value.
			Root string
		}
		// List holds details about calls to the List method.
		List []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// ListProjects holds details about calls to the ListProjects method.
		ListProjects []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// ListWorktrees holds details about calls to the ListWorktrees method.
		ListWorktrees []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// Register holds details about calls to the Register method.
		Register []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Name is the name argument value.
			Name string
			// RepoPath is the repoPath argument value.
			RepoPath string
		}
		// Remove holds details about calls to the Remove method.
		Remove []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Root is the root argument value.
			Root string
		}
		// ResolvePath holds details about calls to the ResolvePath method.
		ResolvePath []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Cwd is the cwd argument value.
			Cwd string
		}
		// Update holds details about calls to the Update method.
		Update []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Entry is the entry argument value.
			Entry config.ProjectEntry
		}
	}
	lockCurrentProject sync.RWMutex
	lockGet            sync.RWMutex
	lockList           sync.RWMutex
	lockListProjects   sync.RWMutex
	lockListWorktrees  sync.RWMutex
	lockRegister       sync.RWMutex
	lockRemove         sync.RWMutex
	lockResolvePath    sync.RWMutex
	lockUpdate         sync.RWMutex
}

// CurrentProject calls CurrentProjectFunc.
func (mock *ProjectManagerMock) CurrentProject(ctx context.Context) (project.Project, error) {
	if mock.CurrentProjectFunc == nil {
		panic("ProjectManagerMock.CurrentProjectFunc: method is nil but ProjectManager.CurrentProject was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockCurrentProject.Lock()
	mock.calls.CurrentProject = append(mock.calls.CurrentProject, callInfo)
	mock.lockCurrentProject.Unlock()
	return mock.CurrentProjectFunc(ctx)
}

// CurrentProjectCalls gets all the calls that were made to CurrentProject.
// Check the length with:
//
//	len(mockedProjectManager.CurrentProjectCalls())
func (mock *ProjectManagerMock) CurrentProjectCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockCurrentProject.RLock()
	calls = mock.calls.CurrentProject
	mock.lockCurrentProject.RUnlock()
	return calls
}

// Get calls GetFunc.
func (mock *ProjectManagerMock) Get(ctx context.Context, root string) (project.Project, error) {
	if mock.GetFunc == nil {
		panic("ProjectManagerMock.GetFunc: method is nil but ProjectManager.Get was just called")
	}
	callInfo := struct {
		Ctx  context.Context
		Root string
	}{
		Ctx:  ctx,
		Root: root,
	}
	mock.lockGet.Lock()
	mock.calls.Get = append(mock.calls.Get, callInfo)
	mock.lockGet.Unlock()
	return mock.GetFunc(ctx, root)
}

// GetCalls gets all the calls that were made to Get.
// Check the length with:
//
//	len(mockedProjectManager.GetCalls())
func (mock *ProjectManagerMock) GetCalls() []struct {
	Ctx  context.Context
	Root string
} {
	var calls []struct {
		Ctx  context.Context
		Root string
	}
	mock.lockGet.RLock()
	calls = mock.calls.Get
	mock.lockGet.RUnlock()
	return calls
}

// List calls ListFunc.
func (mock *ProjectManagerMock) List(ctx context.Context) ([]config.ProjectEntry, error) {
	if mock.ListFunc == nil {
		panic("ProjectManagerMock.ListFunc: method is nil but ProjectManager.List was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockList.Lock()
	mock.calls.List = append(mock.calls.List, callInfo)
	mock.lockList.Unlock()
	return mock.ListFunc(ctx)
}

// ListCalls gets all the calls that were made to List.
// Check the length with:
//
//	len(mockedProjectManager.ListCalls())
func (mock *ProjectManagerMock) ListCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockList.RLock()
	calls = mock.calls.List
	mock.lockList.RUnlock()
	return calls
}

// ListProjects calls ListProjectsFunc.
func (mock *ProjectManagerMock) ListProjects(ctx context.Context) ([]project.ProjectState, error) {
	if mock.ListProjectsFunc == nil {
		panic("ProjectManagerMock.ListProjectsFunc: method is nil but ProjectManager.ListProjects was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockListProjects.Lock()
	mock.calls.ListProjects = append(mock.calls.ListProjects, callInfo)
	mock.lockListProjects.Unlock()
	return mock.ListProjectsFunc(ctx)
}

// ListProjectsCalls gets all the calls that were made to ListProjects.
// Check the length with:
//
//	len(mockedProjectManager.ListProjectsCalls())
func (mock *ProjectManagerMock) ListProjectsCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockListProjects.RLock()
	calls = mock.calls.ListProjects
	mock.lockListProjects.RUnlock()
	return calls
}

// ListWorktrees calls ListWorktreesFunc.
func (mock *ProjectManagerMock) ListWorktrees(ctx context.Context) ([]project.WorktreeState, error) {
	if mock.ListWorktreesFunc == nil {
		panic("ProjectManagerMock.ListWorktreesFunc: method is nil but ProjectManager.ListWorktrees was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockListWorktrees.Lock()
	mock.calls.ListWorktrees = append(mock.calls.ListWorktrees, callInfo)
	mock.lockListWorktrees.Unlock()
	return mock.ListWorktreesFunc(ctx)
}

// ListWorktreesCalls gets all the calls that were made to ListWorktrees.
// Check the length with:
//
//	len(mockedProjectManager.ListWorktreesCalls())
func (mock *ProjectManagerMock) ListWorktreesCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockListWorktrees.RLock()
	calls = mock.calls.ListWorktrees
	mock.lockListWorktrees.RUnlock()
	return calls
}

// Register calls RegisterFunc.
func (mock *ProjectManagerMock) Register(ctx context.Context, name string, repoPath string) (project.Project, error) {
	if mock.RegisterFunc == nil {
		panic("ProjectManagerMock.RegisterFunc: method is nil but ProjectManager.Register was just called")
	}
	callInfo := struct {
		Ctx      context.Context
		Name     string
		RepoPath string
	}{
		Ctx:      ctx,
		Name:     name,
		RepoPath: repoPath,
	}
	mock.lockRegister.Lock()
	mock.calls.Register = append(mock.calls.Register, callInfo)
	mock.lockRegister.Unlock()
	return mock.RegisterFunc(ctx, name, repoPath)
}

// RegisterCalls gets all the calls that were made to Register.
// Check the length with:
//
//	len(mockedProjectManager.RegisterCalls())
func (mock *ProjectManagerMock) RegisterCalls() []struct {
	Ctx      context.Context
	Name     string
	RepoPath string
} {
	var calls []struct {
		Ctx      context.Context
		Name     string
		RepoPath string
	}
	mock.lockRegister.RLock()
	calls = mock.calls.Register
	mock.lockRegister.RUnlock()
	return calls
}

// Remove calls RemoveFunc.
func (mock *ProjectManagerMock) Remove(ctx context.Context, root string) error {
	if mock.RemoveFunc == nil {
		panic("ProjectManagerMock.RemoveFunc: method is nil but ProjectManager.Remove was just called")
	}
	callInfo := struct {
		Ctx  context.Context
		Root string
	}{
		Ctx:  ctx,
		Root: root,
	}
	mock.lockRemove.Lock()
	mock.calls.Remove = append(mock.calls.Remove, callInfo)
	mock.lockRemove.Unlock()
	return mock.RemoveFunc(ctx, root)
}

// RemoveCalls gets all the calls that were made to Remove.
// Check the length with:
//
//	len(mockedProjectManager.RemoveCalls())
func (mock *ProjectManagerMock) RemoveCalls() []struct {
	Ctx  context.Context
	Root string
} {
	var calls []struct {
		Ctx  context.Context
		Root string
	}
	mock.lockRemove.RLock()
	calls = mock.calls.Remove
	mock.lockRemove.RUnlock()
	return calls
}

// ResolvePath calls ResolvePathFunc.
func (mock *ProjectManagerMock) ResolvePath(ctx context.Context, cwd string) (project.Project, error) {
	if mock.ResolvePathFunc == nil {
		panic("ProjectManagerMock.ResolvePathFunc: method is nil but ProjectManager.ResolvePath was just called")
	}
	callInfo := struct {
		Ctx context.Context
		Cwd string
	}{
		Ctx: ctx,
		Cwd: cwd,
	}
	mock.lockResolvePath.Lock()
	mock.calls.ResolvePath = append(mock.calls.ResolvePath, callInfo)
	mock.lockResolvePath.Unlock()
	return mock.ResolvePathFunc(ctx, cwd)
}

// ResolvePathCalls gets all the calls that were made to ResolvePath.
// Check the length with:
//
//	len(mockedProjectManager.ResolvePathCalls())
func (mock *ProjectManagerMock) ResolvePathCalls() []struct {
	Ctx context.Context
	Cwd string
} {
	var calls []struct {
		Ctx context.Context
		Cwd string
	}
	mock.lockResolvePath.RLock()
	calls = mock.calls.ResolvePath
	mock.lockResolvePath.RUnlock()
	return calls
}

// Update calls UpdateFunc.
func (mock *ProjectManagerMock) Update(ctx context.Context, entry config.ProjectEntry) (project.Project, error) {
	if mock.UpdateFunc == nil {
		panic("ProjectManagerMock.UpdateFunc: method is nil but ProjectManager.Update was just called")
	}
	callInfo := struct {
		Ctx   context.Context
		Entry config.ProjectEntry
	}{
		Ctx:   ctx,
		Entry: entry,
	}
	mock.lockUpdate.Lock()
	mock.calls.Update = append(mock.calls.Update, callInfo)
	mock.lockUpdate.Unlock()
	return mock.UpdateFunc(ctx, entry)
}

// UpdateCalls gets all the calls that were made to Update.
// Check the length with:
//
//	len(mockedProjectManager.UpdateCalls())
func (mock *ProjectManagerMock) UpdateCalls() []struct {
	Ctx   context.Context
	Entry config.ProjectEntry
} {
	var calls []struct {
		Ctx   context.Context
		Entry config.ProjectEntry
	}
	mock.lockUpdate.RLock()
	calls = mock.calls.Update
	mock.lockUpdate.RUnlock()
	return calls
}
