package services

import (
	"context"

	"github.com/acp/interceptor/internal/models"
	"github.com/acp/interceptor/internal/policy"
)

// PolicyService evaluates governance policy for an input document.
type PolicyService struct {
	eval policy.Evaluator
}

// NewPolicyService constructs a policy service.
func NewPolicyService(eval policy.Evaluator) PolicyService {
	return PolicyService{eval: eval}
}

// Evaluate runs policy evaluation.
func (s PolicyService) Evaluate(ctx context.Context, in models.PolicyInput) (models.PolicyDecision, error) {
	return s.eval.Evaluate(ctx, in)
}
