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

package resources

import (
	context "context"

	repository "github.com/grafana/grafana/apps/provisioning/pkg/repository"
	mock "github.com/stretchr/testify/mock"
)

// MockRepositoryResourcesFactory is an autogenerated mock type for the RepositoryResourcesFactory type
type MockRepositoryResourcesFactory struct {
	mock.Mock
}

type MockRepositoryResourcesFactory_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRepositoryResourcesFactory) EXPECT() *MockRepositoryResourcesFactory_Expecter {
	return &MockRepositoryResourcesFactory_Expecter{mock: &_m.Mock}
}

// Client provides a mock function with given fields: ctx, repo, opts
func (_m *MockRepositoryResourcesFactory) Client(ctx context.Context, repo repository.ReaderWriter, opts ...RepositoryResourcesOption) (RepositoryResources, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, repo)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 RepositoryResources
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, repository.ReaderWriter, ...RepositoryResourcesOption) (RepositoryResources, error)); ok {
		return rf(ctx, repo, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, repository.ReaderWriter, ...RepositoryResourcesOption) RepositoryResources); ok {
		r0 = rf(ctx, repo, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(RepositoryResources)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, repository.ReaderWriter, ...RepositoryResourcesOption) error); ok {
		r1 = rf(ctx, repo, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Client is a helper method to define mock.On call
//   - ctx context.Context
//   - repo repository.ReaderWriter
//   - opts ...RepositoryResourcesOption
func (_e *MockRepositoryResourcesFactory_Expecter) Client(ctx interface{}, repo interface{}, opts ...interface{}) *MockRepositoryResourcesFactory_Client_Call {
	return &MockRepositoryResourcesFactory_Client_Call{Call: _e.mock.On("Client",
		append([]interface{}{ctx, repo}, opts...)...)}
}

func (_c *MockRepositoryResourcesFactory_Client_Call) Run(run func(ctx context.Context, repo repository.ReaderWriter, opts ...RepositoryResourcesOption)) *MockRepositoryResourcesFactory_Client_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]RepositoryResourcesOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(RepositoryResourcesOption)
			}
		}
		run(args[0].(context.Context), args[1].(repository.ReaderWriter), variadicArgs...)
	})
	return _c
}

func (_c *MockRepositoryResourcesFactory_Client_Call) Return(_a0 RepositoryResources, _a1 error) *MockRepositoryResourcesFactory_Client_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRepositoryResourcesFactory_Client_Call) RunAndReturn(run func(context.Context, repository.ReaderWriter, ...RepositoryResourcesOption) (RepositoryResources, error)) *MockRepositoryResourcesFactory_Client_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
