package middleware

import (
	"go.uber.org/zap"

	"codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/internal/service"
	siteservice "codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/internal/service/site"
	"codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/pkg/security/jwt"
)

// ProvideJWTMiddleware provides a JWT middleware instance
func ProvideJWTMiddleware(jwtProvider jwt.Provider, sessionService service.SessionService, logger *zap.Logger) *JWTMiddleware {
	return NewJWTMiddleware(jwtProvider, sessionService, logger)
}

// ProvideAPIKeyMiddleware provides an API key middleware instance
func ProvideAPIKeyMiddleware(siteService siteservice.AuthenticateAPIKeyService, logger *zap.Logger) *APIKeyMiddleware {
	return NewAPIKeyMiddleware(siteService, logger)
}
