import { _ as __nuxt_component_0$2 } from './TBtn-CruKbB1A.mjs';
import { defineComponent, withCtx, createVNode, renderSlot, defineAsyncComponent, computed, mergeProps, resolveDynamicComponent, unref, createTextVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, withModifiers, createCommentVNode, withAsyncContext, resolveComponent, isRef, useSSRContext } from 'vue';
import { ssrRenderComponent, ssrRenderSlot, ssrRenderAttrs, ssrRenderVNode, ssrInterpolate, ssrRenderAttr, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
import { br as useState, b9 as useI18n, b8 as useHead, bl as useRoute$2, o as _export_sfc, bv as useUserSession, be as useNuxtApp, bc as useLocale, V as VBtn, l as VIcon, aJ as navigateTo, b4 as useFetch } from './server.mjs';
import { u as useAppTheme, a as useInitialCalendarPage } from './useInitialCalendarPage-DDoZ-GC5.mjs';
import { u as useEvents } from './useEvents-lJnkIynN.mjs';
import { S as Statuses } from '../nitro/nitro.mjs';
import { V as VSpacer } from './VSpacer-D6kTsy1m.mjs';
import { V as VSwitch } from './VSwitch-DxIDK6n9.mjs';
import { V as VMenu } from './VMenu-I968mMci.mjs';
import { a as VList, b as VListItem, c as VListItemSubtitle, d as VListItemTitle } from './VOverlay-Dlj-QQp0.mjs';
import { _ as __nuxt_component_2$1 } from './nuxt-link-DENluCKo.mjs';
import { u as useTime } from './useTime-ByXQWA_w.mjs';
import debounce from 'lodash/debounce.js';
import { DateTime } from 'luxon';
import { V as VTextField } from './VTextField-DFD0D30-.mjs';
import { a as VSheet } from './VSheet-DRep8U-I.mjs';
import { V as VDivider } from './VDivider-akc4E5rx.mjs';
import { V as VBadge } from './VBadge-CWMumAZs.mjs';
import { V as VMain, _ as __nuxt_component_3$1 } from './Footer-QapPdznY.mjs';
import { V as VApp } from './VApp-BZMA-BjH.mjs';
import './forwardRefs-C3iWxc5z.mjs';
import 'perfect-debounce';
import 'v-calendar';
import 'linkifyjs';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import '@sequelize/core';
import 'html-to-text';
import 'zod';
import 'crypto';
import 'node:fs';
import 'sharp';
import 'path';
import 'node:stream';
import 'jsdom';
import 'dompurify';
import 'mime-types';
import 'fs';
import 'fs/promises';
import 'linkify-html';
import '@peertube/http-signature';
import 'jsonld';
import 'lodash.intersection';
import 'email-templates';
import 'node:http';
import 'node:https';
import 'node:crypto';
import 'node:events';
import 'node:buffer';
import 'node:path';
import 'vue-router';
import 'dotenv';
import 'url';
import 'bcryptjs';
import 'slugify';
import 'umzug';
import 'consola';
import '@sequelize/core/decorators-legacy';
import 'util';
import 'mitt';
import 'ical.js';
import 'node:url';
import 'fast-xml-parser';
import './helpers-CocmU_lH.mjs';
import './createSimpleFunctional-D4PbVxKo.mjs';
import './index-0tjXFI7F.mjs';
import './autofocus-BUnCw2TG.mjs';
import './VAvatar-DZc9zgUD.mjs';
import './form-Q_oG-_Ip.mjs';
import './animation-DMtpo1PO.mjs';
import './layout-_LUp2zqU.mjs';
import './VDialog-ClVLCNXJ.mjs';

const _sfc_main$5 = /* @__PURE__ */ defineComponent({
  __name: "NavHeader",
  __ssrInlineRender: true,
  setup(__props) {
    const { loggedIn, user, clear } = useUserSession();
    const { $notify } = useNuxtApp();
    const theme = useAppTheme();
    const route = useRoute$2();
    const { params } = useEvents();
    const { locales, t } = useI18n();
    const { current } = useLocale();
    function changeLocale(locale) {
      current.value = locale;
    }
    function logout() {
      clear();
      $notify("common.logout_ok", Statuses.SUCCESS);
      navigateTo("/");
    }
    const in_home = computed(() => route.name === "index");
    return (_ctx, _push, _parent, _attrs) => {
      const _component_t_btn = __nuxt_component_0$2;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "d-flex pa-4" }, _attrs))}>`);
      _push(ssrRenderComponent(VBtn, {
        icon: "",
        to: "/",
        variant: "text",
        active: false
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<img${ssrRenderAttr("src", `/logo.png`)} height="40"${_scopeId}>`);
          } else {
            return [
              createVNode("img", {
                src: `/logo.png`,
                height: "40"
              })
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(VSpacer, null, null, _parent));
      _push(`<div class="d-flex">`);
      if (unref(in_home)) {
        _push(ssrRenderComponent(VSwitch, {
          id: "show_recurrent_switch",
          modelValue: unref(params).show_recurrent,
          "onUpdate:modelValue": ($event) => unref(params).show_recurrent = $event,
          class: "mr-2",
          color: "primary",
          "true-icon": "mdi-repeat",
          "false-icon": "mdi-repeat-off",
          "hide-details": ""
        }, null, _parent));
      } else {
        _push(`<!---->`);
      }
      _push(ssrRenderComponent(_component_t_btn, {
        icon: "mdi-information",
        to: "/about",
        tooltip: "common.about",
        "aria-label": unref(t)("common.about")
      }, null, _parent));
      _push(ssrRenderComponent(_component_t_btn, {
        icon: unref(theme)?.theme.current?.value?.dark ? "mdi-weather-sunny" : "mdi-weather-night",
        tooltip: "common.dark_mode",
        onClick: ($event) => unref(theme).toggleTheme()
      }, null, _parent));
      _push(ssrRenderComponent(VMenu, { transition: "slide-y-transition" }, {
        activator: withCtx(({ props }, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(VBtn, mergeProps({
              variant: "plain",
              icon: "mdi-translate"
            }, props, {
              "aria-label": "Language",
              tooltip: "common.language"
            }), null, _parent2, _scopeId));
          } else {
            return [
              createVNode(VBtn, mergeProps({
                variant: "plain",
                icon: "mdi-translate"
              }, props, {
                "aria-label": "Language",
                tooltip: "common.language"
              }), null, 16)
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(VList, {
              density: "compact",
              "max-height": "350",
              width: "250"
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`<!--[-->`);
                  ssrRenderList(unref(locales), (locale) => {
                    _push3(ssrRenderComponent(VListItem, {
                      key: locale.code,
                      title: locale.name,
                      onClick: ($event) => changeLocale(locale.code)
                    }, null, _parent3, _scopeId2));
                  });
                  _push3(`<!--]-->`);
                  _push3(ssrRenderComponent(VListItem, {
                    target: "_blank",
                    href: "https://hosted.weblate.org/engage/gancio/"
                  }, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(ssrRenderComponent(VListItemSubtitle, null, {
                          default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                            if (_push5) {
                              _push5(`${ssrInterpolate(unref(t)("common.help_translate"))}`);
                            } else {
                              return [
                                createTextVNode(toDisplayString(unref(t)("common.help_translate")), 1)
                              ];
                            }
                          }),
                          _: 1
                        }, _parent4, _scopeId3));
                      } else {
                        return [
                          createVNode(VListItemSubtitle, null, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString(unref(t)("common.help_translate")), 1)
                            ]),
                            _: 1
                          })
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                } else {
                  return [
                    (openBlock(true), createBlock(Fragment, null, renderList(unref(locales), (locale) => {
                      return openBlock(), createBlock(VListItem, {
                        key: locale.code,
                        title: locale.name,
                        onClick: withModifiers(($event) => changeLocale(locale.code), ["prevent"])
                      }, null, 8, ["title", "onClick"]);
                    }), 128)),
                    createVNode(VListItem, {
                      target: "_blank",
                      href: "https://hosted.weblate.org/engage/gancio/"
                    }, {
                      default: withCtx(() => [
                        createVNode(VListItemSubtitle, null, {
                          default: withCtx(() => [
                            createTextVNode(toDisplayString(unref(t)("common.help_translate")), 1)
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    })
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
          } else {
            return [
              createVNode(VList, {
                density: "compact",
                "max-height": "350",
                width: "250"
              }, {
                default: withCtx(() => [
                  (openBlock(true), createBlock(Fragment, null, renderList(unref(locales), (locale) => {
                    return openBlock(), createBlock(VListItem, {
                      key: locale.code,
                      title: locale.name,
                      onClick: withModifiers(($event) => changeLocale(locale.code), ["prevent"])
                    }, null, 8, ["title", "onClick"]);
                  }), 128)),
                  createVNode(VListItem, {
                    target: "_blank",
                    href: "https://hosted.weblate.org/engage/gancio/"
                  }, {
                    default: withCtx(() => [
                      createVNode(VListItemSubtitle, null, {
                        default: withCtx(() => [
                          createTextVNode(toDisplayString(unref(t)("common.help_translate")), 1)
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ];
          }
        }),
        _: 1
      }, _parent));
      if (unref(loggedIn)) {
        _push(ssrRenderComponent(VMenu, { transition: "slide-y-transition" }, {
          activator: withCtx(({ props }, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(ssrRenderComponent(VBtn, mergeProps({
                variant: "plain",
                class: "mr-0",
                icon: "mdi-dots-vertical"
              }, props, {
                title: "Menu",
                "aria-label": "Menu"
              }), null, _parent2, _scopeId));
            } else {
              return [
                createVNode(VBtn, mergeProps({
                  variant: "plain",
                  class: "mr-0",
                  icon: "mdi-dots-vertical"
                }, props, {
                  title: "Menu",
                  "aria-label": "Menu"
                }), null, 16)
              ];
            }
          }),
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(ssrRenderComponent(VList, null, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(VListItem, {
                      to: "/settings",
                      "prepend-icon": "mdi-cog",
                      title: unref(t)("common.settings")
                    }, null, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(VListItem, { to: "/my_events" }, {
                      prepend: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(VIcon, { icon: "mdi-calendar-account" }, null, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(VIcon, { icon: "mdi-calendar-account" })
                          ];
                        }
                      }),
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(VListItemTitle, null, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(`${ssrInterpolate(unref(t)("common.my_events"))}`);
                              } else {
                                return [
                                  createTextVNode(toDisplayString(unref(t)("common.my_events")), 1)
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(VListItemTitle, null, {
                              default: withCtx(() => [
                                createTextVNode(toDisplayString(unref(t)("common.my_events")), 1)
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                    if (unref(user)?.role === "admin" || unref(user)?.role === "editor") {
                      _push3(ssrRenderComponent(VListItem, { to: "/admin" }, {
                        prepend: withCtx((_3, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(ssrRenderComponent(VIcon, { icon: "mdi-account" }, null, _parent4, _scopeId3));
                          } else {
                            return [
                              createVNode(VIcon, { icon: "mdi-account" })
                            ];
                          }
                        }),
                        default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(ssrRenderComponent(VListItemTitle, null, {
                              default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                                if (_push5) {
                                  _push5(`${ssrInterpolate(unref(t)(`common.${unref(user).role}`))}`);
                                } else {
                                  return [
                                    createTextVNode(toDisplayString(unref(t)(`common.${unref(user).role}`)), 1)
                                  ];
                                }
                              }),
                              _: 1
                            }, _parent4, _scopeId3));
                          } else {
                            return [
                              createVNode(VListItemTitle, null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(unref(t)(`common.${unref(user).role}`)), 1)
                                ]),
                                _: 1
                              })
                            ];
                          }
                        }),
                        _: 1
                      }, _parent3, _scopeId2));
                    } else {
                      _push3(`<!---->`);
                    }
                    _push3(ssrRenderComponent(VListItem, { onClick: logout }, {
                      prepend: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(VIcon, { icon: "mdi-logout" }, null, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(VIcon, { icon: "mdi-logout" })
                          ];
                        }
                      }),
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(VListItemTitle, null, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(`${ssrInterpolate(unref(t)("common.logout"))}`);
                              } else {
                                return [
                                  createTextVNode(toDisplayString(unref(t)("common.logout")), 1)
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(VListItemTitle, null, {
                              default: withCtx(() => [
                                createTextVNode(toDisplayString(unref(t)("common.logout")), 1)
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(VListItem, {
                        to: "/settings",
                        "prepend-icon": "mdi-cog",
                        title: unref(t)("common.settings")
                      }, null, 8, ["title"]),
                      createVNode(VListItem, { to: "/my_events" }, {
                        prepend: withCtx(() => [
                          createVNode(VIcon, { icon: "mdi-calendar-account" })
                        ]),
                        default: withCtx(() => [
                          createVNode(VListItemTitle, null, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString(unref(t)("common.my_events")), 1)
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      }),
                      unref(user)?.role === "admin" || unref(user)?.role === "editor" ? (openBlock(), createBlock(VListItem, {
                        key: 0,
                        to: "/admin"
                      }, {
                        prepend: withCtx(() => [
                          createVNode(VIcon, { icon: "mdi-account" })
                        ]),
                        default: withCtx(() => [
                          createVNode(VListItemTitle, null, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString(unref(t)(`common.${unref(user).role}`)), 1)
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })) : createCommentVNode("", true),
                      createVNode(VListItem, { onClick: logout }, {
                        prepend: withCtx(() => [
                          createVNode(VIcon, { icon: "mdi-logout" })
                        ]),
                        default: withCtx(() => [
                          createVNode(VListItemTitle, null, {
                            default: withCtx(() => [
                              createTextVNode(toDisplayString(unref(t)("common.logout")), 1)
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
            } else {
              return [
                createVNode(VList, null, {
                  default: withCtx(() => [
                    createVNode(VListItem, {
                      to: "/settings",
                      "prepend-icon": "mdi-cog",
                      title: unref(t)("common.settings")
                    }, null, 8, ["title"]),
                    createVNode(VListItem, { to: "/my_events" }, {
                      prepend: withCtx(() => [
                        createVNode(VIcon, { icon: "mdi-calendar-account" })
                      ]),
                      default: withCtx(() => [
                        createVNode(VListItemTitle, null, {
                          default: withCtx(() => [
                            createTextVNode(toDisplayString(unref(t)("common.my_events")), 1)
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    unref(user)?.role === "admin" || unref(user)?.role === "editor" ? (openBlock(), createBlock(VListItem, {
                      key: 0,
                      to: "/admin"
                    }, {
                      prepend: withCtx(() => [
                        createVNode(VIcon, { icon: "mdi-account" })
                      ]),
                      default: withCtx(() => [
                        createVNode(VListItemTitle, null, {
                          default: withCtx(() => [
                            createTextVNode(toDisplayString(unref(t)(`common.${unref(user).role}`)), 1)
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    })) : createCommentVNode("", true),
                    createVNode(VListItem, { onClick: logout }, {
                      prepend: withCtx(() => [
                        createVNode(VIcon, { icon: "mdi-logout" })
                      ]),
                      default: withCtx(() => [
                        createVNode(VListItemTitle, null, {
                          default: withCtx(() => [
                            createTextVNode(toDisplayString(unref(t)("common.logout")), 1)
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                })
              ];
            }
          }),
          _: 1
        }, _parent));
      } else {
        _push(`<!---->`);
      }
      if (!unref(loggedIn)) {
        _push(ssrRenderComponent(VBtn, {
          variant: "text",
          class: "mr-0",
          icon: "mdi-login",
          to: "/login",
          title: unref(t)("common.login"),
          "aria-label": unref(t)("common.login")
        }, null, _parent));
      } else {
        _push(`<!---->`);
      }
      _push(`</div></div>`);
    };
  }
});
const _sfc_setup$5 = _sfc_main$5.setup;
_sfc_main$5.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/NavHeader.vue");
  return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
};
const __nuxt_component_0$1 = Object.assign(_sfc_main$5, { __name: "NavHeader" });
const _sfc_main$4 = {
  __name: "CoreCalendar",
  __ssrInlineRender: true,
  setup(__props) {
    const time = useTime();
    const selectedDate = useState("selectedDate");
    const { attributes, params } = useEvents();
    const { theme } = useAppTheme();
    function updatePages(pages) {
      const start = pages?.[0] ?? pages;
      const tmpStart = time.startMonth(start.year, start.month);
      if (tmpStart != params.value.start) {
        params.value.start = tmpStart;
        if (selectedDate.value) {
          selectedDate.value = null;
        }
      }
    }
    const initialPage = useInitialCalendarPage();
    return (_ctx, _push, _parent, _attrs) => {
      const _component_DatePicker = resolveComponent("DatePicker");
      _push(ssrRenderComponent(_component_DatePicker, mergeProps({
        modelValue: unref(selectedDate),
        "onUpdate:modelValue": ($event) => isRef(selectedDate) ? selectedDate.value = $event : null,
        locale: _ctx.$i18n.locale,
        "title-position": "left",
        transition: "fade",
        "is-dark": unref(theme).current?.value?.dark,
        class: "bg-transparent-semi",
        "aria-label": "Calendar",
        expanded: "",
        attributes: unref(attributes),
        "initial-page": unref(initialPage),
        "onUpdate:pages": updatePages
      }, _attrs), null, _parent));
    };
  }
};
const _sfc_setup$4 = _sfc_main$4.setup;
_sfc_main$4.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/Core/Calendar.vue");
  return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
};
function useIsSearchingCalendar() {
  const { params } = useEvents();
  const selectedDate = useState("selectedDate");
  const thisMonth = DateTime.local().startOf("month");
  return computed(() => {
    const queryDate = DateTime.fromSeconds(params.value.start);
    const isSameMonth = queryDate.diff(thisMonth, "months").months === 0;
    return selectedDate.value != null || !isSameMonth;
  });
}
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
  __name: "NavSearch",
  __ssrInlineRender: true,
  async setup(__props) {
    let __temp, __restore;
    const settings = useState("settings");
    const route = useRoute$2();
    const { params, pending } = useEvents();
    const onSearchChanged = debounce((value) => {
      params.value.query = value || void 0;
      navigateTo({ query: { query: params.value.query } });
    }, 500);
    const { data: collections } = ([__temp, __restore] = withAsyncContext(() => useFetch(
      "/api/collections",
      { query: { pin: true } },
      "$n3C6WekeBC"
      /* nuxt-injected */
    )), __temp = await __temp, __restore(), __temp);
    const show_search = computed(() => route?.name === "index");
    const show_calendar = computed(() => !settings.value?.hide_calendar && route?.name === "index");
    const show_collections_bar = computed(() => ["index", "collection-name"].includes(route?.name));
    const isCalendarDisabled = computed((oldValue) => pending.value ? oldValue : !!params.value.query);
    const isSearchingDates = useIsSearchingCalendar();
    return (_ctx, _push, _parent, _attrs) => {
      const _component_CoreCalendar = _sfc_main$4;
      _push(`<div${ssrRenderAttrs(mergeProps({
        id: "navsearch",
        class: "mt-2 mt-sm-4"
      }, _attrs))}><div class="mx-2">`);
      if (unref(show_search)) {
        _push(ssrRenderComponent(VTextField, {
          id: "main-search",
          class: "bg-transparent-semi",
          color: "primary",
          variant: "outlined",
          density: "comfortable",
          "hide-details": "",
          placeholder: _ctx.$t("common.search"),
          clearable: "",
          "model-value": unref(params).query,
          "prepend-inner-icon": "mdi-magnify",
          "onUpdate:modelValue": unref(onSearchChanged)
        }, {
          "append-inner": withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              if (!unref(show_calendar) && !unref(isCalendarDisabled)) {
                _push2(ssrRenderComponent(VMenu, {
                  location: "bottom center",
                  width: "100%",
                  transition: "slide-y-transition",
                  "scroll-strategy": "block",
                  "close-on-content-click": false,
                  eager: unref(isSearchingDates)
                }, {
                  activator: withCtx(({ props: activatorProps }, _push3, _parent3, _scopeId2) => {
                    if (_push3) {
                      _push3(ssrRenderComponent(VDivider, {
                        vertical: "",
                        class: "my-3 mx-1"
                      }, null, _parent3, _scopeId2));
                      _push3(`<div class="me-n1"${_scopeId2}>`);
                      _push3(ssrRenderComponent(VBadge, {
                        color: "error",
                        dot: "",
                        "model-value": unref(isSearchingDates)
                      }, {
                        default: withCtx((_2, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(ssrRenderComponent(VBtn, mergeProps({
                              icon: "mdi-calendar-search",
                              density: "comfortable"
                            }, activatorProps), null, _parent4, _scopeId3));
                          } else {
                            return [
                              createVNode(VBtn, mergeProps({
                                icon: "mdi-calendar-search",
                                density: "comfortable"
                              }, activatorProps), null, 16)
                            ];
                          }
                        }),
                        _: 2
                      }, _parent3, _scopeId2));
                      _push3(`</div>`);
                    } else {
                      return [
                        createVNode(VDivider, {
                          vertical: "",
                          class: "my-3 mx-1"
                        }),
                        createVNode("div", { class: "me-n1" }, [
                          createVNode(VBadge, {
                            color: "error",
                            dot: "",
                            "model-value": unref(isSearchingDates)
                          }, {
                            default: withCtx(() => [
                              createVNode(VBtn, mergeProps({
                                icon: "mdi-calendar-search",
                                density: "comfortable"
                              }, activatorProps), null, 16)
                            ]),
                            _: 2
                          }, 1032, ["model-value"])
                        ])
                      ];
                    }
                  }),
                  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                    if (_push3) {
                      _push3(`<div id="floating-calendar" class="w-100 px-sm-2 mt-1"${_scopeId2}>`);
                      _push3(ssrRenderComponent(VSheet, { class: "elevation-8 rounded" }, {
                        default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(ssrRenderComponent(_component_CoreCalendar, null, null, _parent4, _scopeId3));
                          } else {
                            return [
                              createVNode(_component_CoreCalendar)
                            ];
                          }
                        }),
                        _: 1
                      }, _parent3, _scopeId2));
                      _push3(`</div>`);
                    } else {
                      return [
                        createVNode("div", {
                          id: "floating-calendar",
                          class: "w-100 px-sm-2 mt-1"
                        }, [
                          createVNode(VSheet, { class: "elevation-8 rounded" }, {
                            default: withCtx(() => [
                              createVNode(_component_CoreCalendar)
                            ]),
                            _: 1
                          })
                        ])
                      ];
                    }
                  }),
                  _: 1
                }, _parent2, _scopeId));
              } else {
                _push2(`<!---->`);
              }
            } else {
              return [
                !unref(show_calendar) && !unref(isCalendarDisabled) ? (openBlock(), createBlock(VMenu, {
                  key: 0,
                  location: "bottom center",
                  width: "100%",
                  transition: "slide-y-transition",
                  "scroll-strategy": "block",
                  "close-on-content-click": false,
                  eager: unref(isSearchingDates)
                }, {
                  activator: withCtx(({ props: activatorProps }) => [
                    createVNode(VDivider, {
                      vertical: "",
                      class: "my-3 mx-1"
                    }),
                    createVNode("div", { class: "me-n1" }, [
                      createVNode(VBadge, {
                        color: "error",
                        dot: "",
                        "model-value": unref(isSearchingDates)
                      }, {
                        default: withCtx(() => [
                          createVNode(VBtn, mergeProps({
                            icon: "mdi-calendar-search",
                            density: "comfortable"
                          }, activatorProps), null, 16)
                        ]),
                        _: 2
                      }, 1032, ["model-value"])
                    ])
                  ]),
                  default: withCtx(() => [
                    createVNode("div", {
                      id: "floating-calendar",
                      class: "w-100 px-sm-2 mt-1"
                    }, [
                      createVNode(VSheet, { class: "elevation-8 rounded" }, {
                        default: withCtx(() => [
                          createVNode(_component_CoreCalendar)
                        ]),
                        _: 1
                      })
                    ])
                  ]),
                  _: 1
                }, 8, ["eager"])) : createCommentVNode("", true)
              ];
            }
          }),
          _: 1
        }, _parent));
      } else {
        _push(`<!---->`);
      }
      if (unref(show_collections_bar)) {
        _push(`<div><!--[-->`);
        ssrRenderList(unref(collections), (collection) => {
          _push(ssrRenderComponent(VBtn, {
            key: collection.id,
            class: "mr-2 mt-2 bg-transparent-semi",
            size: "small",
            variant: "outlined",
            color: "primary",
            to: `/collection/${encodeURIComponent(collection.name)}`
          }, {
            default: withCtx((_, _push2, _parent2, _scopeId) => {
              if (_push2) {
                _push2(`${ssrInterpolate(collection.name)}`);
              } else {
                return [
                  createTextVNode(toDisplayString(collection.name), 1)
                ];
              }
            }),
            _: 2
          }, _parent));
        });
        _push(`<!--]--></div>`);
      } else {
        _push(`<!---->`);
      }
      if (unref(show_calendar)) {
        _push(`<div class="mt-2" style="${ssrRenderStyle(!unref(isCalendarDisabled) ? null : { display: "none" })}">`);
        _push(ssrRenderComponent(_component_CoreCalendar, null, null, _parent));
        _push(`</div>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</div></div>`);
    };
  }
});
const _sfc_setup$3 = _sfc_main$3.setup;
_sfc_main$3.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/NavSearch.vue");
  return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
};
const __nuxt_component_2 = Object.assign(_sfc_main$3, { __name: "NavSearch" });
const _sfc_main$2 = {
  __name: "NavBar",
  __ssrInlineRender: true,
  setup(__props) {
    const settings = useState("settings");
    const { loggedIn } = useUserSession();
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<div${ssrRenderAttrs(mergeProps({
        id: "navbar",
        class: "d-flex justify-space-between justify-sm-center ga-2 pa-2 mt-2"
      }, _attrs))} data-v-a4c0dd5b>`);
      if (unref(loggedIn) || unref(settings).allow_anon_event) {
        _push(ssrRenderComponent(VBtn, {
          to: "/add",
          "aria-label": _ctx.$t("common.add_event"),
          variant: "text",
          class: "icon-button px-3 px-sm-4"
        }, {
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(`<span class="me-1" data-v-a4c0dd5b${_scopeId}>${ssrInterpolate(_ctx.$t("common.add_event"))}</span>`);
              _push2(ssrRenderComponent(VIcon, {
                color: "primary",
                icon: "mdi-plus"
              }, null, _parent2, _scopeId));
            } else {
              return [
                createVNode("span", { class: "me-1" }, toDisplayString(_ctx.$t("common.add_event")), 1),
                createVNode(VIcon, {
                  color: "primary",
                  icon: "mdi-plus"
                })
              ];
            }
          }),
          _: 1
        }, _parent));
      } else {
        _push(`<!---->`);
      }
      _push(ssrRenderComponent(VBtn, {
        to: "/export",
        "aria-label": _ctx.$t("common.share"),
        variant: "text",
        class: "icon-button px-3 px-sm-4"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<span class="d-none d-sm-block me-1" data-v-a4c0dd5b${_scopeId}>${ssrInterpolate(_ctx.$t("common.share"))}</span>`);
            _push2(ssrRenderComponent(VIcon, { icon: "mdi-share-variant" }, null, _parent2, _scopeId));
          } else {
            return [
              createVNode("span", { class: "d-none d-sm-block me-1" }, toDisplayString(_ctx.$t("common.share")), 1),
              createVNode(VIcon, { icon: "mdi-share-variant" })
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</div>`);
    };
  }
};
const _sfc_setup$2 = _sfc_main$2.setup;
_sfc_main$2.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/NavBar.vue");
  return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
};
const __nuxt_component_3 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a4c0dd5b"]]);
const headerImage = 'url("/headerimage.png")';
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
  __name: "AppBar",
  __ssrInlineRender: true,
  setup(__props) {
    const settings = useState("settings");
    const route = useRoute$2();
    const show_calendar = computed(() => !settings.value?.hide_calendar && route?.name === "index");
    const show_collections_bar = computed(() => ["index", "collection-name"].includes(route.name));
    return (_ctx, _push, _parent, _attrs) => {
      const _component_NavHeader = __nuxt_component_0$1;
      const _component_nuxt_link = __nuxt_component_2$1;
      const _component_NavSearch = __nuxt_component_2;
      const _component_NavBar = __nuxt_component_3;
      const _cssVars = { style: {
        ":--v096530b4": headerImage
      } };
      _push(`<nav${ssrRenderAttrs(mergeProps({ id: "AppBar" }, _attrs, _cssVars))}>`);
      _push(ssrRenderComponent(_component_NavHeader, null, null, _parent));
      ssrRenderVNode(_push, createVNode(resolveDynamicComponent(_ctx.$route.name === "index" ? "h1" : "div"), { class: "text-center" }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(_component_nuxt_link, {
              id: "title",
              color: "primary",
              to: "/"
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`${ssrInterpolate(unref(settings)?.title ?? "Gancio")}`);
                } else {
                  return [
                    createTextVNode(toDisplayString(unref(settings)?.title ?? "Gancio"), 1)
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`<div class="text-body-1 font-weight-light pb-3"${_scopeId}>${unref(settings)?.description ?? "a shared agenda for local communities" ?? ""}</div>`);
          } else {
            return [
              createVNode(_component_nuxt_link, {
                id: "title",
                color: "primary",
                to: "/"
              }, {
                default: withCtx(() => [
                  createTextVNode(toDisplayString(unref(settings)?.title ?? "Gancio"), 1)
                ]),
                _: 1
              }),
              createVNode("div", {
                class: "text-body-1 font-weight-light pb-3",
                innerHTML: unref(settings)?.description ?? "a shared agenda for local communities"
              }, null, 8, ["innerHTML"])
            ];
          }
        }),
        _: 1
      }), _parent);
      _push(ssrRenderComponent(_component_NavSearch, {
        style: unref(show_collections_bar) || unref(show_calendar) ? null : { display: "none" }
      }, null, _parent));
      if (!["event-slug", "e-slug"].includes(unref(route).name)) {
        _push(ssrRenderComponent(_component_NavBar, null, null, _parent));
      } else {
        _push(`<!---->`);
      }
      _push(`</nav>`);
    };
  }
});
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/Core/AppBar.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const __nuxt_component_0 = Object.assign(_sfc_main$1, { __name: "CoreAppBar" });
const __nuxt_component_1_lazy = defineAsyncComponent(() => import('./Dialog-MyCEsDa3.mjs').then((c) => c.default || c));
const __nuxt_component_2_lazy = defineAsyncComponent(() => import('./Notification-C90y0TCL.mjs').then((c) => c.default || c));
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "default",
  __ssrInlineRender: true,
  setup(__props) {
    const settings = useState("settings");
    const { locale } = useI18n();
    useHead({
      htmlAttrs: {
        lang: locale.value
      },
      link: [
        { rel: "icon", type: "image/png", href: settings.value.baseurl + "/logo.png" },
        { rel: "stylesheet", href: settings.value.baseurl + "/custom_css" }
      ],
      script: [
        { type: "application/javascript", async: true, src: "/custom_js", defer: true, tagPosition: "bodyClose" }
      ]
    });
    return (_ctx, _push, _parent, _attrs) => {
      const _component_CoreAppBar = __nuxt_component_0;
      const _component_LazyCoreDialog = __nuxt_component_1_lazy;
      const _component_LazyCoreNotification = __nuxt_component_2_lazy;
      const _component_CoreFooter = __nuxt_component_3$1;
      _push(ssrRenderComponent(VApp, _attrs, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(_component_CoreAppBar, null, null, _parent2, _scopeId));
            _push2(ssrRenderComponent(VMain, null, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_LazyCoreDialog, null, null, _parent3, _scopeId2));
                  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push3, _parent3, _scopeId2);
                } else {
                  return [
                    createVNode(_component_LazyCoreDialog),
                    renderSlot(_ctx.$slots, "default")
                  ];
                }
              }),
              _: 3
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_LazyCoreNotification, null, null, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_CoreFooter, null, null, _parent2, _scopeId));
          } else {
            return [
              createVNode(_component_CoreAppBar),
              createVNode(VMain, null, {
                default: withCtx(() => [
                  createVNode(_component_LazyCoreDialog),
                  renderSlot(_ctx.$slots, "default")
                ]),
                _: 3
              }),
              createVNode(_component_LazyCoreNotification),
              createVNode(_component_CoreFooter)
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("layouts/default.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as default };
