package model

import "fmt"

type CustomerRequest struct{}
type SupportHandler interface {
	HandleRequest(request CustomerRequest)
}

type FirstLevelSupportHandler struct {
	nextHandler SupportHandler
}

func NewFirstLevelSupportHandler(nextHandler SupportHandler) FirstLevelSupportHandler {
	return FirstLevelSupportHandler{nextHandler: nextHandler}
}

func (f FirstLevelSupportHandler) HandleRequest(request CustomerRequest) {
	if true {
		f.nextHandler.HandleRequest(request)
	}
}

type SecondLevelSupportHandler struct {
	nextHandler SupportHandler
}

func NewSecondLevelSupportHandler(nextHandler SupportHandler) SecondLevelSupportHandler {
	return SecondLevelSupportHandler{nextHandler: nextHandler}
}

func (f SecondLevelSupportHandler) HandleRequest(request CustomerRequest) {
	if true {
		f.nextHandler.HandleRequest(request)
	}
}

type ThirdLevelSupportHandler struct {
}

func NewThirdLevelSupportHandler() ThirdLevelSupportHandler {
	return ThirdLevelSupportHandler{}
}

func (t ThirdLevelSupportHandler) HandleRequest(request CustomerRequest) {
	fmt.Println("i have to handle it")
}
