// Code generated by templ@(devel) DO NOT EDIT.
package components
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import "context"
import "io"
import "bytes"
func Login() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
templBuffer, templIsBuffer := w.(*bytes.Buffer)
if !templIsBuffer {
templBuffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templBuffer)
}
ctx = templ.InitializeContext(ctx)
var_1 := templ.GetChildren(ctx)
if var_1 == nil {
var_1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
var_2 := templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
templBuffer, templIsBuffer := w.(*bytes.Buffer)
if !templIsBuffer {
templBuffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templBuffer)
}
_, err = templBuffer.WriteString("<div class=\"bg-lime-200\"><form class=\"flex flex-col p-2 gap-2\" hx-post=\"/auth/login\" hx-target=\"#login_error\"><label for=\"login_email\">")
if err != nil {
return err
}
var_3 := `Email`
_, err = templBuffer.WriteString(var_3)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</label><input class=\"border\" type=\"text\" placeholder=\"...\" name=\"email\" id=\"login_email\"><label for=\"login_password\">")
if err != nil {
return err
}
var_4 := `Password`
_, err = templBuffer.WriteString(var_4)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</label><input class=\"border\" type=\"password\" placeholder=\"...\" name=\"password\" id=\"login_password\"><div class=\"text-rose-600 text-center\" id=\"login_error\"></div><button class=\"border p-1\" type=\"submit\">")
if err != nil {
return err
}
var_5 := `Login`
_, err = templBuffer.WriteString(var_5)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</button></form></div>")
if err != nil {
return err
}
if !templIsBuffer {
_, err = io.Copy(w, templBuffer)
}
return err
})
err = Base("Login").Render(templ.WithChildren(ctx, var_2), templBuffer)
if err != nil {
return err
}
if !templIsBuffer {
_, err = templBuffer.WriteTo(w)
}
return err
})
}