package components import ( "tangled.org/arabica.social/arabica/internal/entities" "tangled.org/arabica.social/arabica/internal/lexicons" ) // ModalShellProps configures the shared dialog wrapper used by entity // create/edit modals. Body content is passed as templ children. type ModalShellProps struct { Type lexicons.RecordType RKey string // "" = create, non-empty = edit ExtraXData string // optional Alpine x-data; if empty, "{ serverError: '' }" is used } func modalShellXData(extra string) string { if extra != "" { return extra } return "{ serverError: '' }" } func modalActionURL(d *entities.Descriptor, rkey string) string { if rkey != "" { return "/api/" + d.URLPath + "/" + rkey } return "/api/" + d.URLPath } templ ModalShell(props ModalShellProps) { if d := entities.Get(props.Type); d != nil { } }