package v1

import (
	"context"

	"github.com/pingcap-inc/pingcat/internal/apiserver/store"
	v1 "github.com/pingcap-inc/pingcat/model/v1"
)

type ChatService struct {
	store store.Factory
}

type ChatSrv interface {
	ReplyGeneralMsg(ctx context.Context, d v1.MsgReqData) (*v1.MessageResData, error)
	ReplyLarkMsg(ctx context.Context, me *v1.LarkMsgEvent) error
	SendTextLarkMsg(ctx context.Context, me *v1.LarkMsgEvent, msg string) (*v1.LarkReplyMsgResData, error)
	PreValidateLarkMsg(ctx context.Context, me *v1.LarkMsgEvent) bool
}

var _ ChatSrv = (*ChatService)(nil)

func NewChat(store store.Factory) *ChatService {
	return &ChatService{store: store}
}
