package port

import (
	"context"

	"github.com/orchard9/rdev/internal/domain"
)

// QuestionRepository defines operations for question persistence.
type QuestionRepository interface {
	// CreateQuestion creates a new question.
	CreateQuestion(ctx context.Context, question *domain.Question) error

	// GetQuestion retrieves a question by ID.
	GetQuestion(ctx context.Context, id domain.QuestionID) (*domain.Question, error)

	// ListUnansweredQuestions returns all unanswered questions for a project.
	ListUnansweredQuestions(ctx context.Context, projectID string) ([]*domain.Question, error)

	// ListQuestionsByConversation returns all questions for a conversation.
	ListQuestionsByConversation(ctx context.Context, conversationID domain.ConversationID) ([]*domain.Question, error)

	// AnswerQuestion records an answer to a question.
	AnswerQuestion(ctx context.Context, id domain.QuestionID, answer *string, answerChoices []string) error

	// DeleteQuestion deletes a question.
	DeleteQuestion(ctx context.Context, id domain.QuestionID) error
}
