package main

import (
	"io/fs"
	"net/http"

	"git.dev.alexdunmow.com/block/pluginsdk/blocks"
	"git.dev.alexdunmow.com/block/pluginsdk/plugin"
	"git.dev.alexdunmow.com/block/pluginsdk/templates"
)

// Registration is the compile-time plugin registration for the Cal.com Booking block.
var Registration = plugin.PluginRegistration{
	Name:    "calcomblock",
	Version: plugin.ParseModVersion(pluginModBytes),
	Register: func(tr templates.TemplateRegistry, br blocks.BlockRegistry) error {
		return Register(tr, br)
	},
	Assets:        func() http.Handler { return AssetsHandler() },
	Schemas:       func() fs.FS { return Schemas() },
	HTTPHandler:   func(deps plugin.CoreServices) http.Handler { return NewCalcomRouter(deps) },
	SettingsPanel: func() string { return SettingsPanel() },
}
