package handlers

import (
	"context"
	"fmt"

	"git.optclblast.xyz/draincloud/draincloud-core/internal/common"
	"git.optclblast.xyz/draincloud/draincloud-core/internal/handler"
	resolvedispatcher "git.optclblast.xyz/draincloud/draincloud-core/internal/resolve_dispatcher"
)

// TODO. Maybe remove
type InternalRegisterResolverHandler struct {
	*handler.BaseHandler
	resolveDispatcher *resolvedispatcher.ResolveDispatcher
}

func NewInternalRegisterResolverHandler(
	resolveDispatcher *resolvedispatcher.ResolveDispatcher,
) *InternalRegisterResolverHandler {
	h := &InternalRegisterResolverHandler{
		resolveDispatcher: resolveDispatcher,
	}
	h.BaseHandler = handler.New().
		WithName("internal_registerresolver").
		WithProcessFunc(h.process)

	return h
}

func (h *InternalRegisterResolverHandler) process(
	ctx context.Context,
	req *common.Request,
	w handler.Writer,
) error {
	//_, ok := h.resolveDispatcher.GetResolver()
	return fmt.Errorf("uniplemented")
}
