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

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/bff"
	"github.com/agntcy/identity-service/internal/core/badge/types"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type BadgeService_Expecter struct {
	mock *mock.Mock
}

func (_m *BadgeService) EXPECT() *BadgeService_Expecter {
	return &BadgeService_Expecter{mock: &_m.Mock}
}

// GetBadge provides a mock function for the type BadgeService
func (_mock *BadgeService) GetBadge(ctx context.Context, appID string) (*types.Badge, error) {
	ret := _mock.Called(ctx, appID)

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

	var r0 *types.Badge
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*types.Badge, error)); ok {
		return returnFunc(ctx, appID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *types.Badge); ok {
		r0 = returnFunc(ctx, appID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.Badge)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, appID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetBadge is a helper method to define mock.On call
//   - ctx context.Context
//   - appID string
func (_e *BadgeService_Expecter) GetBadge(ctx interface{}, appID interface{}) *BadgeService_GetBadge_Call {
	return &BadgeService_GetBadge_Call{Call: _e.mock.On("GetBadge", ctx, appID)}
}

func (_c *BadgeService_GetBadge_Call) Run(run func(ctx context.Context, appID string)) *BadgeService_GetBadge_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *BadgeService_GetBadge_Call) Return(badge *types.Badge, err error) *BadgeService_GetBadge_Call {
	_c.Call.Return(badge, err)
	return _c
}

func (_c *BadgeService_GetBadge_Call) RunAndReturn(run func(ctx context.Context, appID string) (*types.Badge, error)) *BadgeService_GetBadge_Call {
	_c.Call.Return(run)
	return _c
}

// IssueBadge provides a mock function for the type BadgeService
func (_mock *BadgeService) IssueBadge(ctx context.Context, appID string, options ...bff.IssueOption) (*types.Badge, error) {
	// bff.IssueOption
	_va := make([]interface{}, len(options))
	for _i := range options {
		_va[_i] = options[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, appID)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

	var r0 *types.Badge
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...bff.IssueOption) (*types.Badge, error)); ok {
		return returnFunc(ctx, appID, options...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...bff.IssueOption) *types.Badge); ok {
		r0 = returnFunc(ctx, appID, options...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.Badge)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...bff.IssueOption) error); ok {
		r1 = returnFunc(ctx, appID, options...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// IssueBadge is a helper method to define mock.On call
//   - ctx context.Context
//   - appID string
//   - options ...bff.IssueOption
func (_e *BadgeService_Expecter) IssueBadge(ctx interface{}, appID interface{}, options ...interface{}) *BadgeService_IssueBadge_Call {
	return &BadgeService_IssueBadge_Call{Call: _e.mock.On("IssueBadge",
		append([]interface{}{ctx, appID}, options...)...)}
}

func (_c *BadgeService_IssueBadge_Call) Run(run func(ctx context.Context, appID string, options ...bff.IssueOption)) *BadgeService_IssueBadge_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []bff.IssueOption
		variadicArgs := make([]bff.IssueOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(bff.IssueOption)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *BadgeService_IssueBadge_Call) Return(badge *types.Badge, err error) *BadgeService_IssueBadge_Call {
	_c.Call.Return(badge, err)
	return _c
}

func (_c *BadgeService_IssueBadge_Call) RunAndReturn(run func(ctx context.Context, appID string, options ...bff.IssueOption) (*types.Badge, error)) *BadgeService_IssueBadge_Call {
	_c.Call.Return(run)
	return _c
}

// VerifyBadge provides a mock function for the type BadgeService
func (_mock *BadgeService) VerifyBadge(ctx context.Context, badge *string) (*types.VerificationResult, error) {
	ret := _mock.Called(ctx, badge)

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

	var r0 *types.VerificationResult
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *string) (*types.VerificationResult, error)); ok {
		return returnFunc(ctx, badge)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *string) *types.VerificationResult); ok {
		r0 = returnFunc(ctx, badge)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.VerificationResult)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *string) error); ok {
		r1 = returnFunc(ctx, badge)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// VerifyBadge is a helper method to define mock.On call
//   - ctx context.Context
//   - badge *string
func (_e *BadgeService_Expecter) VerifyBadge(ctx interface{}, badge interface{}) *BadgeService_VerifyBadge_Call {
	return &BadgeService_VerifyBadge_Call{Call: _e.mock.On("VerifyBadge", ctx, badge)}
}

func (_c *BadgeService_VerifyBadge_Call) Run(run func(ctx context.Context, badge *string)) *BadgeService_VerifyBadge_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *string
		if args[1] != nil {
			arg1 = args[1].(*string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *BadgeService_VerifyBadge_Call) Return(verificationResult *types.VerificationResult, err error) *BadgeService_VerifyBadge_Call {
	_c.Call.Return(verificationResult, err)
	return _c
}

func (_c *BadgeService_VerifyBadge_Call) RunAndReturn(run func(ctx context.Context, badge *string) (*types.VerificationResult, error)) *BadgeService_VerifyBadge_Call {
	_c.Call.Return(run)
	return _c
}
