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

package telegram

import (
	"sync"

	"github.com/balerter/balerter/internal/channels/telegram/api"
)

// APIerMock is a mock implementation of APIer.
//
// 	func TestSomethingThatUsesAPIer(t *testing.T) {
//
// 		// make and configure a mocked APIer
// 		mockedAPIer := &APIerMock{
// 			SendPhotoMessageFunc: func(photoMessage *api.PhotoMessage) error {
// 				panic("mock out the SendPhotoMessage method")
// 			},
// 			SendTextMessageFunc: func(textMessage *api.TextMessage) error {
// 				panic("mock out the SendTextMessage method")
// 			},
// 		}
//
// 		// use mockedAPIer in code that requires APIer
// 		// and then make assertions.
//
// 	}
type APIerMock struct {
	// SendPhotoMessageFunc mocks the SendPhotoMessage method.
	SendPhotoMessageFunc func(photoMessage *api.PhotoMessage) error

	// SendTextMessageFunc mocks the SendTextMessage method.
	SendTextMessageFunc func(textMessage *api.TextMessage) error

	// calls tracks calls to the methods.
	calls struct {
		// SendPhotoMessage holds details about calls to the SendPhotoMessage method.
		SendPhotoMessage []struct {
			// PhotoMessage is the photoMessage argument value.
			PhotoMessage *api.PhotoMessage
		}
		// SendTextMessage holds details about calls to the SendTextMessage method.
		SendTextMessage []struct {
			// TextMessage is the textMessage argument value.
			TextMessage *api.TextMessage
		}
	}
	lockSendPhotoMessage sync.RWMutex
	lockSendTextMessage  sync.RWMutex
}

// SendPhotoMessage calls SendPhotoMessageFunc.
func (mock *APIerMock) SendPhotoMessage(photoMessage *api.PhotoMessage) error {
	if mock.SendPhotoMessageFunc == nil {
		panic("APIerMock.SendPhotoMessageFunc: method is nil but APIer.SendPhotoMessage was just called")
	}
	callInfo := struct {
		PhotoMessage *api.PhotoMessage
	}{
		PhotoMessage: photoMessage,
	}
	mock.lockSendPhotoMessage.Lock()
	mock.calls.SendPhotoMessage = append(mock.calls.SendPhotoMessage, callInfo)
	mock.lockSendPhotoMessage.Unlock()
	return mock.SendPhotoMessageFunc(photoMessage)
}

// SendPhotoMessageCalls gets all the calls that were made to SendPhotoMessage.
// Check the length with:
//     len(mockedAPIer.SendPhotoMessageCalls())
func (mock *APIerMock) SendPhotoMessageCalls() []struct {
	PhotoMessage *api.PhotoMessage
} {
	var calls []struct {
		PhotoMessage *api.PhotoMessage
	}
	mock.lockSendPhotoMessage.RLock()
	calls = mock.calls.SendPhotoMessage
	mock.lockSendPhotoMessage.RUnlock()
	return calls
}

// SendTextMessage calls SendTextMessageFunc.
func (mock *APIerMock) SendTextMessage(textMessage *api.TextMessage) error {
	if mock.SendTextMessageFunc == nil {
		panic("APIerMock.SendTextMessageFunc: method is nil but APIer.SendTextMessage was just called")
	}
	callInfo := struct {
		TextMessage *api.TextMessage
	}{
		TextMessage: textMessage,
	}
	mock.lockSendTextMessage.Lock()
	mock.calls.SendTextMessage = append(mock.calls.SendTextMessage, callInfo)
	mock.lockSendTextMessage.Unlock()
	return mock.SendTextMessageFunc(textMessage)
}

// SendTextMessageCalls gets all the calls that were made to SendTextMessage.
// Check the length with:
//     len(mockedAPIer.SendTextMessageCalls())
func (mock *APIerMock) SendTextMessageCalls() []struct {
	TextMessage *api.TextMessage
} {
	var calls []struct {
		TextMessage *api.TextMessage
	}
	mock.lockSendTextMessage.RLock()
	calls = mock.calls.SendTextMessage
	mock.lockSendTextMessage.RUnlock()
	return calls
}
