scanfile/server/web/templui/components/calendar/calendar_templ.go
2025-06-03 15:44:56 +02:00

328 lines
24 KiB
Go

// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.865
// templui component calendar - version: main installed by templui v0.71.0
package calendar
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import (
"git.jmbit.de/jmb/scanfile/server/web/templui/components/icon"
"git.jmbit.de/jmb/scanfile/server/web/templui/utils"
"strconv"
"time"
)
type LocaleTag string
var (
LocaleDefaultTag = LocaleTag("en-US")
LocaleTagChinese = LocaleTag("zh-CN")
LocaleTagFrench = LocaleTag("fr-FR")
LocaleTagGerman = LocaleTag("de-DE")
LocaleTagItalian = LocaleTag("it-IT")
LocaleTagJapanese = LocaleTag("ja-JP")
LocaleTagPortuguese = LocaleTag("pt-PT")
LocaleTagSpanish = LocaleTag("es-ES")
)
type Props struct {
ID string
Class string
LocaleTag LocaleTag
Value *time.Time
Name string
InitialMonth int // Optional: 0-11 (Default: current or from Value). Controls the initially displayed month view.
InitialYear int // Optional: (Default: current or from Value). Controls the initially displayed year view.
}
func Calendar(props ...Props) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = Script().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var p Props
if len(props) > 0 {
p = props[0]
}
if p.ID == "" {
p.ID = utils.RandomID() + "-calendar"
}
if p.Name == "" {
// Should be provided by parent (e.g., DatePicker or in standalone usage)
p.Name = p.ID + "-value" // Fallback name
}
if p.LocaleTag == "" {
p.LocaleTag = LocaleDefaultTag
}
initialView := time.Now()
if p.Value != nil {
initialView = *p.Value
}
initialMonth := p.InitialMonth
initialYear := p.InitialYear
// Use year from initialView if InitialYear prop is invalid/unset (<= 0)
if initialYear <= 0 {
initialYear = initialView.Year()
}
// Use month from initialView if InitialMonth prop is invalid OR
// if InitialMonth is default 0 AND InitialYear was also defaulted (meaning neither was likely set explicitly)
if (initialMonth < 0 || initialMonth > 11) || (initialMonth == 0 && p.InitialYear <= 0) {
initialMonth = int(initialView.Month()) - 1 // time.Month is 1-12
}
initialSelectedISO := ""
if p.Value != nil {
initialSelectedISO = p.Value.Format("2006-01-02")
}
var templ_7745c5c3_Var2 = []any{p.Class}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-wrapper")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 76, Col: 46}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" data-calendar-wrapper=\"true\"><input type=\"hidden\" name=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 79, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(initialSelectedISO)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 80, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-hidden")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 81, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" data-calendar-hidden-input><div id=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 85, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" data-calendar-container=\"true\" data-locale-tag=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.LocaleTag))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 87, Col: 40}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" data-initial-month=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(initialMonth))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 88, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\" data-initial-year=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(initialYear))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 89, Col: 48}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\" data-selected-date=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(initialSelectedISO)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 90, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\"><!-- Calendar Header --><div class=\"flex items-center justify-between mb-4\"><span data-calendar-month-display class=\"text-sm font-medium\"></span><div class=\"flex gap-1\"><button type=\"button\" data-calendar-prev class=\"inline-flex items-center justify-center rounded-md text-sm font-medium h-7 w-7 hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = icon.ChevronLeft().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</button> <button type=\"button\" data-calendar-next class=\"inline-flex items-center justify-center rounded-md text-sm font-medium h-7 w-7 hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = icon.ChevronRight().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</button></div></div><!-- Weekday Headers --><div data-calendar-weekdays class=\"grid grid-cols-7 gap-1 mb-1 place-items-center\"></div><!-- Calendar Day Grid --><div data-calendar-days class=\"grid grid-cols-7 gap-1 place-items-center\"></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var handle = templ.NewOnceHandle()
func Script() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var13 := templ.GetChildren(ctx)
if templ_7745c5c3_Var13 == nil {
templ_7745c5c3_Var13 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var14 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<script defer nonce=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/calendar/calendar.templ`, Line: 116, Col: 43}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\">\n\t\t\t(function() {\n function initCalendar(container) {\n if (!container || container._calendarInitialized) return;\n\n const monthDisplay = container.querySelector('[data-calendar-month-display]');\n const weekdaysContainer = container.querySelector('[data-calendar-weekdays]');\n const daysContainer = container.querySelector('[data-calendar-days]');\n const prevButton = container.querySelector('[data-calendar-prev]');\n const nextButton = container.querySelector('[data-calendar-next]');\n const wrapper = container.closest('[data-calendar-wrapper]');\n const hiddenInput = wrapper ? wrapper.querySelector('[data-calendar-hidden-input]') : null;\n\n if (!monthDisplay || !weekdaysContainer || !daysContainer || !prevButton || !nextButton || !hiddenInput) {\n console.error('Calendar init error: Missing required elements (or hidden input relative to wrapper).', container);\n return;\n }\n\n const localeTag = container.dataset.localeTag || 'en-US';\n let monthNames;\n try {\n monthNames = Array.from({ length: 12 }, (_, i) =>\n new Intl.DateTimeFormat(localeTag, { month: 'long', timeZone: 'UTC' }).format(new Date(Date.UTC(2000, i, 1)))\n );\n } catch (e) {\n console.error(`Calendar: Error generating month names via Intl (locale: \"${localeTag}\"). Falling back to English.`, e);\n // Fallback to English names if Intl fails for any reason\n monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n }\n let dayNames = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; // Default fallback\n \n try {\n // Use days 0-6 (Sun-Sat standard). Intl provides names in the locale's typical order.\n dayNames = Array.from({ length: 7 }, (_, i) =>\n new Intl.DateTimeFormat(localeTag, { weekday: 'short' }).format(new Date(Date.UTC(2000, 0, i))) \n );\n } catch (e) {\n console.error('Error generating calendar day names via Intl:', e);\n // Keep default dayNames on error\n }\n \n let currentMonth = parseInt(container.dataset.initialMonth);\n let currentYear = parseInt(container.dataset.initialYear);\n let selectedDate = null; // Stored as JS Date object (UTC midnight)\n\n if (container.dataset.selectedDate) {\n selectedDate = parseISODate(container.dataset.selectedDate);\n }\n\n function parseISODate(isoStr) {\n if (!isoStr) return null;\n try {\n const parts = isoStr.split('-');\n const year = parseInt(parts[0], 10);\n const month = parseInt(parts[1], 10) - 1; // JS month is 0-indexed\n const day = parseInt(parts[2], 10);\n const date = new Date(Date.UTC(year, month, day));\n if (!isNaN(date) && date.getUTCFullYear() === year && date.getUTCMonth() === month && date.getUTCDate() === day) {\n return date;\n }\n } catch {}\n return null;\n }\n\n function updateMonthDisplay() {\n // Always use the fallback month name combined with the current year\n // Ensure month index is within bounds (0-11)\n const monthIndex = Math.max(0, Math.min(11, currentMonth)); \n const monthName = monthNames[monthIndex]; \n const displayString = `${monthName} ${currentYear}`;\n monthDisplay.textContent = displayString;\n }\n\n function renderWeekdays() {\n weekdaysContainer.innerHTML = '';\n dayNames.forEach(day => {\n const el = document.createElement('div');\n el.className = 'text-center text-xs text-muted-foreground font-medium';\n el.textContent = day;\n weekdaysContainer.appendChild(el);\n });\n }\n\n function renderCalendar() {\n daysContainer.innerHTML = '';\n const firstDayOfMonth = new Date(Date.UTC(currentYear, currentMonth, 1));\n const firstDayUTCDay = firstDayOfMonth.getUTCDay(); // 0=Sun\n let startOffset = firstDayUTCDay; // Simple Sunday start offset\n // NOTE: A robust implementation might need to adjust offset based on locale's actual first day of week.\n // Intl doesn't directly provide this easily yet. Keep Sunday start for simplicity.\n\n const daysInMonth = new Date(Date.UTC(currentYear, currentMonth + 1, 0)).getUTCDate();\n // Calculate 'today' based on the browser's local date for correct highlighting\n const now = new Date(); \n const today = new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()));\n\n for (let i = 0; i < startOffset; i++) {\n const blank = document.createElement('div');\n blank.className = 'h-8 w-8';\n daysContainer.appendChild(blank);\n }\n\n for (let day = 1; day <= daysInMonth; day++) {\n const button = document.createElement('button');\n button.type = 'button';\n button.className = 'inline-flex h-8 w-8 items-center justify-center rounded-md text-sm font-medium focus:outline-none focus:ring-1 focus:ring-ring';\n button.textContent = day;\n button.dataset.day = day;\n const currentDate = new Date(Date.UTC(currentYear, currentMonth, day));\n const isSelected = selectedDate && currentDate.getTime() === selectedDate.getTime();\n const isToday = currentDate.getTime() === today.getTime();\n\n if (isSelected) button.classList.add('bg-primary', 'text-primary-foreground', 'hover:bg-primary/90');\n else if (isToday) button.classList.add('bg-accent', 'text-accent-foreground');\n else button.classList.add('hover:bg-accent', 'hover:text-accent-foreground');\n\n button.addEventListener('click', handleDayClick);\n daysContainer.appendChild(button);\n }\n }\n\n function handlePrevMonthClick() {\n currentMonth--;\n if (currentMonth < 0) { currentMonth = 11; currentYear--; }\n updateMonthDisplay(); renderCalendar();\n }\n\n function handleNextMonthClick() {\n currentMonth++;\n if (currentMonth > 11) { currentMonth = 0; currentYear++; }\n updateMonthDisplay(); renderCalendar();\n }\n\n function handleDayClick(event) {\n const day = parseInt(event.target.dataset.day);\n if (!day) return;\n const newlySelectedDate = new Date(Date.UTC(currentYear, currentMonth, day));\n\n selectedDate = newlySelectedDate;\n\n const isoFormattedValue = newlySelectedDate.toISOString().split('T')[0];\n hiddenInput.value = isoFormattedValue;\n hiddenInput.dispatchEvent(new Event('change', { bubbles: true }));\n\n container.dispatchEvent(new CustomEvent('calendar-date-selected', {\n bubbles: true,\n detail: { date: newlySelectedDate }\n }));\n\n renderCalendar();\n }\n\n // Initialization\n prevButton.addEventListener('click', handlePrevMonthClick);\n nextButton.addEventListener('click', handleNextMonthClick);\n\n updateMonthDisplay();\n renderWeekdays();\n renderCalendar();\n\n container._calendarInitialized = true;\n }\n\n function initAllComponents(root = document) {\n if (root instanceof Element && root.matches('[data-calendar-container]')) {\n initCalendar(root);\n }\n\n for (const calendar of root.querySelectorAll('[data-calendar-container]')) {\n initCalendar(calendar);\n }\n }\n\n const handleHtmxSwap = (event) => {\n const target = event.detail.target || event.detail.elt;\n if (target instanceof Element) {\n requestAnimationFrame(() => initAllComponents(target));\n }\n };\n\n initAllComponents();\n document.addEventListener('DOMContentLoaded', () => initAllComponents());\n document.body.addEventListener('htmx:afterSwap', handleHtmxSwap);\n document.body.addEventListener('htmx:oobAfterSwap', handleHtmxSwap);\n\t\t\t})();\n\t\t</script>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
templ_7745c5c3_Err = handle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var _ = templruntime.GeneratedTemplate