package components

import (
	b "github.com/willoma/bulma-gomponents"
	g "maragu.dev/gomponents"
	hx "maragu.dev/gomponents-htmx"
	. "maragu.dev/gomponents/html"
)

var BaseUrl = "https://api.portfolio.dariusklein.nl"

// todo var BaseUrl = "http://localhost:4001"

func Login() g.Node {
	return Form(hx.Post(BaseUrl+"/login"), //https://api.portfolio.dariusklein.nl/login
		Class("max-w-xl m-auto py-32"),
		b.Box(
			Email(false, false, nil),
			Password(false, false, nil),
			b.Field(
				b.Grouped,
				b.Control(
					b.Button(b.Link, "login"),
				),
			),
		),
	)
}
