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

package mocks

import (
	context "context"

	entities "github.com/UpmeshLTD/urus-aio/infrastructure/db/entities"
	mock "github.com/stretchr/testify/mock"
)

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

// CreateAddress provides a mock function with given fields: ctx, _a1
func (_m *Repository) CreateAddress(ctx context.Context, _a1 *entities.Address) (*entities.Address, error) {
	ret := _m.Called(ctx, _a1)

	var r0 *entities.Address
	if rf, ok := ret.Get(0).(func(context.Context, *entities.Address) *entities.Address); ok {
		r0 = rf(ctx, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.Address)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *entities.Address) error); ok {
		r1 = rf(ctx, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateBuyerAddress provides a mock function with given fields: ctx, entity
func (_m *Repository) CreateBuyerAddress(ctx context.Context, entity *entities.BuyerAddress) (*entities.BuyerAddress, error) {
	ret := _m.Called(ctx, entity)

	var r0 *entities.BuyerAddress
	if rf, ok := ret.Get(0).(func(context.Context, *entities.BuyerAddress) *entities.BuyerAddress); ok {
		r0 = rf(ctx, entity)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.BuyerAddress)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *entities.BuyerAddress) error); ok {
		r1 = rf(ctx, entity)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateDraftCheckoutInfo provides a mock function with given fields: ctx, params
func (_m *Repository) CreateDraftCheckoutInfo(ctx context.Context, params *entities.SaveDraftCheckoutInfoParams) (*entities.DraftCheckoutInfo, error) {
	ret := _m.Called(ctx, params)

	var r0 *entities.DraftCheckoutInfo
	if rf, ok := ret.Get(0).(func(context.Context, *entities.SaveDraftCheckoutInfoParams) *entities.DraftCheckoutInfo); ok {
		r0 = rf(ctx, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.DraftCheckoutInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *entities.SaveDraftCheckoutInfoParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DeleteAddress provides a mock function with given fields: ctx, id
func (_m *Repository) DeleteAddress(ctx context.Context, id entities.ID) error {
	ret := _m.Called(ctx, id)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteBuyerAddress provides a mock function with given fields: ctx, id
func (_m *Repository) DeleteBuyerAddress(ctx context.Context, id entities.ID) error {
	ret := _m.Called(ctx, id)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteDraftCheckoutInfoByCartID provides a mock function with given fields: ctx, cartId
func (_m *Repository) DeleteDraftCheckoutInfoByCartID(ctx context.Context, cartId string) error {
	ret := _m.Called(ctx, cartId)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = rf(ctx, cartId)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetAddressByID provides a mock function with given fields: ctx, id
func (_m *Repository) GetAddressByID(ctx context.Context, id entities.ID) (*entities.Address, error) {
	ret := _m.Called(ctx, id)

	var r0 *entities.Address
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID) *entities.Address); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.Address)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, entities.ID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetBuyerAddressByID provides a mock function with given fields: ctx, id
func (_m *Repository) GetBuyerAddressByID(ctx context.Context, id entities.ID) (*entities.BuyerAddress, error) {
	ret := _m.Called(ctx, id)

	var r0 *entities.BuyerAddress
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID) *entities.BuyerAddress); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.BuyerAddress)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, entities.ID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetBuyerAddresses provides a mock function with given fields: ctx, params
func (_m *Repository) GetBuyerAddresses(ctx context.Context, params *entities.GetBuyerAddressByBuyerIDParams) ([]*entities.BuyerAddress, error) {
	ret := _m.Called(ctx, params)

	var r0 []*entities.BuyerAddress
	if rf, ok := ret.Get(0).(func(context.Context, *entities.GetBuyerAddressByBuyerIDParams) []*entities.BuyerAddress); ok {
		r0 = rf(ctx, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*entities.BuyerAddress)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *entities.GetBuyerAddressByBuyerIDParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetDraftCheckoutInfo provides a mock function with given fields: ctx, query
func (_m *Repository) GetDraftCheckoutInfo(ctx context.Context, query *entities.DraftCheckoutInfo) (*entities.DraftCheckoutInfo, error) {
	ret := _m.Called(ctx, query)

	var r0 *entities.DraftCheckoutInfo
	if rf, ok := ret.Get(0).(func(context.Context, *entities.DraftCheckoutInfo) *entities.DraftCheckoutInfo); ok {
		r0 = rf(ctx, query)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.DraftCheckoutInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *entities.DraftCheckoutInfo) error); ok {
		r1 = rf(ctx, query)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetDraftCheckoutInfoByCartID provides a mock function with given fields: ctx, cartId
func (_m *Repository) GetDraftCheckoutInfoByCartID(ctx context.Context, cartId string) (*entities.DraftCheckoutInfo, error) {
	ret := _m.Called(ctx, cartId)

	var r0 *entities.DraftCheckoutInfo
	if rf, ok := ret.Get(0).(func(context.Context, string) *entities.DraftCheckoutInfo); ok {
		r0 = rf(ctx, cartId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.DraftCheckoutInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, cartId)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// UpdateAddress provides a mock function with given fields: ctx, id, _a2
func (_m *Repository) UpdateAddress(ctx context.Context, id entities.ID, _a2 *entities.Address) error {
	ret := _m.Called(ctx, id, _a2)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID, *entities.Address) error); ok {
		r0 = rf(ctx, id, _a2)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// UpdateBuyerAddress provides a mock function with given fields: ctx, id, entity
func (_m *Repository) UpdateBuyerAddress(ctx context.Context, id entities.ID, entity *entities.BuyerAddress) (*entities.BuyerAddress, error) {
	ret := _m.Called(ctx, id, entity)

	var r0 *entities.BuyerAddress
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID, *entities.BuyerAddress) *entities.BuyerAddress); ok {
		r0 = rf(ctx, id, entity)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.BuyerAddress)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, entities.ID, *entities.BuyerAddress) error); ok {
		r1 = rf(ctx, id, entity)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// UpdateBuyerAddressDefaultStatus provides a mock function with given fields: ctx, id, isDefault
func (_m *Repository) UpdateBuyerAddressDefaultStatus(ctx context.Context, id entities.ID, isDefault bool) error {
	ret := _m.Called(ctx, id, isDefault)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID, bool) error); ok {
		r0 = rf(ctx, id, isDefault)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// UpdateDraftCheckoutInfo provides a mock function with given fields: ctx, addressId, params
func (_m *Repository) UpdateDraftCheckoutInfo(ctx context.Context, addressId entities.ID, params *entities.SaveDraftCheckoutInfoParams) (*entities.DraftCheckoutInfo, error) {
	ret := _m.Called(ctx, addressId, params)

	var r0 *entities.DraftCheckoutInfo
	if rf, ok := ret.Get(0).(func(context.Context, entities.ID, *entities.SaveDraftCheckoutInfoParams) *entities.DraftCheckoutInfo); ok {
		r0 = rf(ctx, addressId, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entities.DraftCheckoutInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, entities.ID, *entities.SaveDraftCheckoutInfoParams) error); ok {
		r1 = rf(ctx, addressId, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type mockConstructorTestingTNewRepository interface {
	mock.TestingT
	Cleanup(func())
}

// NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewRepository(t mockConstructorTestingTNewRepository) *Repository {
	mock := &Repository{}
	mock.Mock.Test(t)

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

	return mock
}
