namespace GmRelay.Shared.Platform;

public interface IPlatformMessenger
{
    Task SendGroupMessageAsync(PlatformGroup group, string htmlText, IReadOnlyList<PlatformMessageAction> actions, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support messages with actions.");

    Task UpdateGroupMessageAsync(PlatformMessageRef messageRef, string htmlText, IReadOnlyList<PlatformMessageAction> actions, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support message updates with actions.");

    Task<PlatformMessageRef> CreateThreadAsync(PlatformGroup group, string title, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support thread creation.");

    Task DeleteThreadAsync(PlatformGroup group, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support thread deletion.");

    Task DeleteMessageAsync(PlatformMessageRef messageRef, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support message deletion.");

    Task<PlatformMessageRef> SendScheduleAsync(PlatformScheduleMessage message, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support schedule messages.");

    Task UpdateScheduleAsync(PlatformScheduleMessage message, CancellationToken ct);

    Task SendGroupMessageAsync(PlatformGroup group, string htmlText, CancellationToken ct);

    Task SendPrivateMessageAsync(PlatformPrivateMessage message, CancellationToken ct);

    Task AnswerInteractionAsync(PlatformInteractionReply reply, CancellationToken ct);

    Task SendCalendarFileAsync(PlatformCalendarFile file, CancellationToken ct);

    Task<PlatformMessageRef> SendConfirmationRequestAsync(PlatformConfirmationRequest request, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support confirmation requests.");

    Task UpdateConfirmationRequestAsync(PlatformRsvpMessageUpdate update, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support confirmation request updates.");

    Task<PlatformMessageRef> SendJoinLinkNotificationAsync(PlatformJoinLinkNotification notification, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support join-link notifications.");

    Task SendDirectSessionNotificationAsync(PlatformDirectSessionNotification notification, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support direct session notifications.");

    Task SendRsvpOutcomeAsync(PlatformRsvpOutcomeNotification notification, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support RSVP outcome notifications.");

    Task UpdateRescheduleVoteAsync(PlatformRescheduleVoteUpdate update, CancellationToken ct) =>
        throw new NotSupportedException("This platform messenger does not support reschedule vote updates.");
}
