// 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 ManageAdmin() 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>")
if err != nil {
return err
}
var_3 := `todo: probs have like stats and that kinda stuff here`
_, err = templBuffer.WriteString(var_3)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</div> <div class=\"flex flex-col\"><a class=\"border p-2\" href=\"/manage/admin/users\">")
if err != nil {
return err
}
var_4 := `Users`
_, err = templBuffer.WriteString(var_4)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</a><a class=\"border p-2\" href=\"/manage/admin/domains\">")
if err != nil {
return err
}
var_5 := `Domains`
_, err = templBuffer.WriteString(var_5)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</a></div>")
if err != nil {
return err
}
if !templIsBuffer {
_, err = io.Copy(w, templBuffer)
}
return err
})
err = ManageBase("ManageAdmin").Render(templ.WithChildren(ctx, var_2), templBuffer)
if err != nil {
return err
}
if !templIsBuffer {
_, err = templBuffer.WriteTo(w)
}
return err
})
}
func ManageAdminUsers() 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_6 := templ.GetChildren(ctx)
if var_6 == nil {
var_6 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
var_7 := 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-yellow-200\"><form class=\"flex flex-col p-2 gap-2\" hx-post=\"/manage/admin/users\" hx-target=\"#add_user_error\"><label for=\"email\">")
if err != nil {
return err
}
var_8 := `Email`
_, err = templBuffer.WriteString(var_8)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</label><input class=\"border\" type=\"text\" placeholder=\"name@example.com\" name=\"email\" id=\"email\"><label for=\"initial_pwd\">")
if err != nil {
return err
}
var_9 := `Initial Password`
_, err = templBuffer.WriteString(var_9)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</label><input class=\"border\" type=\"password\" placeholder=\"...\" name=\"initial_pwd\" id=\"initial_pwd\"><div class=\"text-rose-600 text-center\" id=\"add_user_error\"></div><button class=\"border p-1\" type=\"submit\">")
if err != nil {
return err
}
var_10 := `Add`
_, err = templBuffer.WriteString(var_10)
if err != nil {
return err
}
_, err = templBuffer.WriteString("</button></form></div> <div hx-get=\"/manage/admin/partials/users_list\" hx-trigger=\"load, update-user-list from:body\" hx-target=\"this\"></div>")
if err != nil {
return err
}
if !templIsBuffer {
_, err = io.Copy(w, templBuffer)
}
return err
})
err = ManageBase("ManageAdmin").Render(templ.WithChildren(ctx, var_7), templBuffer)
if err != nil {
return err
}
if !templIsBuffer {
_, err = templBuffer.WriteTo(w)
}
return err
})
}
func ManageAdminDomains() 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_11 := templ.GetChildren(ctx)
if var_11 == nil {
var_11 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
var_12 := 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 hx-get=\"/manage/admin/partials/domains_list\" hx-trigger=\"load\" hx-target=\"this\"></div>")
if err != nil {
return err
}
if !templIsBuffer {
_, err = io.Copy(w, templBuffer)
}
return err
})
err = ManageBase("ManageAdmin").Render(templ.WithChildren(ctx, var_12), templBuffer)
if err != nil {
return err
}
if !templIsBuffer {
_, err = templBuffer.WriteTo(w)
}
return err
})
}