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

package mocks

import (
	"context"

	"github.com/AvengeMedia/dankcalendar/core/internal/calendar"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

// MockProviderFactory is an autogenerated mock type for the ProviderFactory type
type MockProviderFactory struct {
	mock.Mock
}

type MockProviderFactory_Expecter struct {
	mock *mock.Mock
}

func (_m *MockProviderFactory) EXPECT() *MockProviderFactory_Expecter {
	return &MockProviderFactory_Expecter{mock: &_m.Mock}
}

// Build provides a mock function for the type MockProviderFactory
func (_mock *MockProviderFactory) Build(ctx context.Context, account calendar.Account, secrets calendar.SecretStore) (calendar.Provider, error) {
	ret := _mock.Called(ctx, account, secrets)

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

	var r0 calendar.Provider
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, calendar.Account, calendar.SecretStore) (calendar.Provider, error)); ok {
		return returnFunc(ctx, account, secrets)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, calendar.Account, calendar.SecretStore) calendar.Provider); ok {
		r0 = returnFunc(ctx, account, secrets)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(calendar.Provider)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, calendar.Account, calendar.SecretStore) error); ok {
		r1 = returnFunc(ctx, account, secrets)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Build is a helper method to define mock.On call
//   - ctx context.Context
//   - account calendar.Account
//   - secrets calendar.SecretStore
func (_e *MockProviderFactory_Expecter) Build(ctx any, account any, secrets any) *MockProviderFactory_Build_Call {
	return &MockProviderFactory_Build_Call{Call: _e.mock.On("Build", ctx, account, secrets)}
}

func (_c *MockProviderFactory_Build_Call) Run(run func(ctx context.Context, account calendar.Account, secrets calendar.SecretStore)) *MockProviderFactory_Build_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 calendar.Account
		if args[1] != nil {
			arg1 = args[1].(calendar.Account)
		}
		var arg2 calendar.SecretStore
		if args[2] != nil {
			arg2 = args[2].(calendar.SecretStore)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockProviderFactory_Build_Call) Return(provider calendar.Provider, err error) *MockProviderFactory_Build_Call {
	_c.Call.Return(provider, err)
	return _c
}

func (_c *MockProviderFactory_Build_Call) RunAndReturn(run func(ctx context.Context, account calendar.Account, secrets calendar.SecretStore) (calendar.Provider, error)) *MockProviderFactory_Build_Call {
	_c.Call.Return(run)
	return _c
}

// Kind provides a mock function for the type MockProviderFactory
func (_mock *MockProviderFactory) Kind() calendar.AccountKind {
	ret := _mock.Called()

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

	var r0 calendar.AccountKind
	if returnFunc, ok := ret.Get(0).(func() calendar.AccountKind); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(calendar.AccountKind)
	}
	return r0
}

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

// Kind is a helper method to define mock.On call
func (_e *MockProviderFactory_Expecter) Kind() *MockProviderFactory_Kind_Call {
	return &MockProviderFactory_Kind_Call{Call: _e.mock.On("Kind")}
}

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

func (_c *MockProviderFactory_Kind_Call) Return(accountKind calendar.AccountKind) *MockProviderFactory_Kind_Call {
	_c.Call.Return(accountKind)
	return _c
}

func (_c *MockProviderFactory_Kind_Call) RunAndReturn(run func() calendar.AccountKind) *MockProviderFactory_Kind_Call {
	_c.Call.Return(run)
	return _c
}
