package controller

import (
	"opencatd-open/internal/service"

	"gorm.io/gorm"
)

type Api struct {
	db             *gorm.DB
	userService    *service.UserServiceImpl
	tokenService   *service.TokenServiceImpl
	keyService     *service.ApiKeyServiceImpl
	webAuthService *service.WebAuthnService
	usageService   *service.UsageService
}

func NewApi(db *gorm.DB, userService *service.UserServiceImpl, tokenService *service.TokenServiceImpl, keyService *service.ApiKeyServiceImpl, webAuthService *service.WebAuthnService, usageService *service.UsageService) *Api {
	return &Api{
		db:             db,
		userService:    userService,
		tokenService:   tokenService,
		keyService:     keyService,
		webAuthService: webAuthService,
		usageService:   usageService,
	}
}
