package notifications

import (
	messaging "github.com/tech/sendico/pkg/messaging/envelope"
	on "github.com/tech/sendico/pkg/messaging/notifications/object"
	nm "github.com/tech/sendico/pkg/model/notification"
	"github.com/tech/sendico/pkg/mservice"
	"go.mongodb.org/mongo-driver/v2/bson"
)

func InvitationCreated(
	sender string,
	actorAccountRef bson.ObjectID,
	objectType mservice.Type,
	objectRef bson.ObjectID,
) messaging.Envelope {
	return on.ObjectCreated(sender, actorAccountRef, mservice.Invitations, objectRef)
}

func InvitationUpdated(
	sender string,
	actorAccountRef bson.ObjectID,
	objectRef bson.ObjectID,
) messaging.Envelope {
	return on.ObjectUpdated(sender, actorAccountRef, mservice.Invitations, objectRef)
}

func InvitationDeleted(
	sender string,
	actorAccountRef bson.ObjectID,
	objectRef bson.ObjectID,
) messaging.Envelope {
	return on.ObjectDeleted(sender, actorAccountRef, mservice.Invitations, objectRef)
}

func Invitation(
	sender string,
	actorAccountRef bson.ObjectID,
	objectRef bson.ObjectID,
	action nm.NotificationAction,
) messaging.Envelope {
	return on.Object(sender, actorAccountRef, mservice.Invitations, objectRef, action)
}
