package antispam

import (
	"html/template"
	"net/http"
)

type Noop struct{}

func (_ *Noop) Script() template.HTML {
	return ""
}

func (_ *Noop) FormField() template.HTML {
	return ""
}

func (_ *Noop) CheckRequest(_ *http.Request) (bool, error) {
	return true, nil
}

var globalNoop = &Noop{}

// NewNoop returns an antispam implementation that allows every request.
func NewNoop() *Noop {
	return globalNoop
}
