// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
// Copyright (c) Abstract Machines

// SPDX-License-Identifier: Apache-2.0

package mocks

import (
	"context"

	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Callout_Expecter struct {
	mock *mock.Mock
}

func (_m *Callout) EXPECT() *Callout_Expecter {
	return &Callout_Expecter{mock: &_m.Mock}
}

// Callout provides a mock function for the type Callout
func (_mock *Callout) Callout(ctx context.Context, perm string, pl map[string]any) error {
	ret := _mock.Called(ctx, perm, pl)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, map[string]any) error); ok {
		r0 = returnFunc(ctx, perm, pl)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Callout is a helper method to define mock.On call
//   - ctx context.Context
//   - perm string
//   - pl map[string]any
func (_e *Callout_Expecter) Callout(ctx interface{}, perm interface{}, pl interface{}) *Callout_Callout_Call {
	return &Callout_Callout_Call{Call: _e.mock.On("Callout", ctx, perm, pl)}
}

func (_c *Callout_Callout_Call) Run(run func(ctx context.Context, perm string, pl map[string]any)) *Callout_Callout_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 map[string]any
		if args[2] != nil {
			arg2 = args[2].(map[string]any)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Callout_Callout_Call) RunAndReturn(run func(ctx context.Context, perm string, pl map[string]any) error) *Callout_Callout_Call {
	_c.Call.Return(run)
	return _c
}
