import axios from "axios";
import { resolveComponent, withCtx, createBlock, openBlock, createTextVNode, toDisplayString, createVNode, useSSRContext } from "vue";
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderAttr, ssrRenderClass, ssrInterpolate, ssrRenderList } from "vue/server-renderer";
import { _ as _imports_0$1 } from "./chunk-D6xvUbdb.js";
import { _ as _export_sfc } from "../entries/pages.mjs";
import "@vue/server-renderer";
import "vue-router";
import "@vueuse/head";
import "vike/server";
/* empty css               */
/* empty css               */
import "pinia";
import "vue-i18n";
/*! src/assets/images/logo-red.svg [vike:pluginModuleBanner] */
const _imports_1 = "/assets/static/logo-red.sYgO_ENW.svg";
/*! src/assets/images/logo-white.svg [vike:pluginModuleBanner] */
const _imports_0 = "/assets/static/logo-white.C-d_95Ms.svg";
/*! src/assets/images/logo.svg [vike:pluginModuleBanner] */
const _imports_3 = "/assets/static/logo.1OE4qxHd.svg";
/*! src/components/Navbar.vue [vike:pluginModuleBanner] */
const _sfc_main$2 = {
  data() {
    return {
      whiteHeaderList: ["contact-us", "clients", "blog-details"],
      redHeaderList: ["modules", "modules-details", "sectors", "sectors-details", "blogs"],
      sidebarActive: false,
      sectorsDropdownVisible: false,
      modulesDropdownVisible: false,
      windowWidth: typeof window === "undefined" ? 1024 : window.innerWidth,
      sectorsList: [],
      modulesList: []
    };
  },
  watch: {
    windowWidth() {
      this.sidebarActive = false;
      this.sectorsDropdownVisible = false;
      this.modulesDropdownVisible = false;
    },
    "$route"() {
      this.sidebarActive = false;
    }
  },
  computed: {
    languageSwitchHref() {
      const current = this.$route.fullPath || this.$route.path || "/";
      const nextLang = this.$route.params.lang === "en" ? "ar" : "en";
      if (/^\/(en|ar)(\/|$)/.test(current)) {
        return current.replace(/^\/(en|ar)(?=\/|\?|$)/, `/${nextLang}`);
      }
      return `/${nextLang}${current.startsWith("/") ? "" : "/"}${current}`;
    }
  },
  methods: {
    toggleDropdown(dropdown) {
      this.sectorsDropdownVisible = dropdown !== "sectorsDropdownVisible" ? false : this.sectorsDropdownVisible;
      this.modulesDropdownVisible = dropdown !== "modulesDropdownVisible" ? false : this.modulesDropdownVisible;
      this[dropdown] = !this[dropdown];
    },
    closeDropdown(event) {
      if (event.target.classList[0] !== "menu-btn") {
        this.sectorsDropdownVisible = false;
        this.modulesDropdownVisible = false;
      }
    },
    updateWidth() {
      this.windowWidth = window.innerWidth;
    },
    async loadSectorsModulesLists() {
      try {
        const response = await axios.get("https://admin.valueerp.net/api/sectorsModules");
        this.sectorsList = response.data.data.data;
        this.modulesList = response.data.data.modules;
      } catch (error) {
      } finally {
      }
    }
  },
  mounted() {
    document.addEventListener("click", this.closeDropdown);
    window.addEventListener("resize", this.updateWidth);
  },
  beforeUnmount() {
    document.removeEventListener("click", this.closeDropdown);
  },
  unmounted() {
    window.removeEventListener("resize", this.updateWidth);
  },
  created() {
    if (typeof window !== "undefined") {
      this.loadSectorsModulesLists();
    }
  },
  async serverPrefetch() {
    await this.loadSectorsModulesLists();
  }
};
function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_router_link = resolveComponent("router-link");
  _push(`<div${ssrRenderAttrs(_attrs)}><!-- Navbar --><div class="max-w-screen-2xl mx-auto xl:px-20 md:px-12 sm:px-8 px-6 py-6 h-full flex items-center justify-between gap-4"><div class="flex items-center xl:gap-24 gap-10">`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "home" },
    class: "shrink-0"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        if ($data.whiteHeaderList.includes(_ctx.$route.name)) {
          _push2(`<img${ssrRenderAttr("src", _imports_0$1)} class="w-28" alt="Value plus logo"${_scopeId}>`);
        } else if ($data.redHeaderList.includes(_ctx.$route.name)) {
          _push2(`<img${ssrRenderAttr("src", _imports_1)} class="w-28" alt="Value plus logo"${_scopeId}>`);
        } else {
          _push2(`<img${ssrRenderAttr("src", _imports_0)} class="w-28" alt="Value plus logo"${_scopeId}>`);
        }
      } else {
        return [
          $data.whiteHeaderList.includes(_ctx.$route.name) ? (openBlock(), createBlock("img", {
            key: 0,
            src: _imports_0$1,
            class: "w-28",
            alt: "Value plus logo"
          })) : $data.redHeaderList.includes(_ctx.$route.name) ? (openBlock(), createBlock("img", {
            key: 1,
            src: _imports_1,
            class: "w-28",
            alt: "Value plus logo"
          })) : (openBlock(), createBlock("img", {
            key: 2,
            src: _imports_0,
            class: "w-28",
            alt: "Value plus logo"
          }))
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`<div class="${ssrRenderClass(`lg:flex hidden items-center xl:gap-8 gap-4 ${$data.whiteHeaderList.includes(_ctx.$route.name) ? "text-carbon" : "text-white"}`)}">`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "home" },
    "exact-active-class": `${_ctx.$route.name === "home" ? "text-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "text-amour" : "text-ambassador-blue"} font-semibold border-b-2 border-solid ${_ctx.$route.name === "home" ? "border-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "border-amour" : "border-ambassador-blue"}`
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Home"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Home")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`<div class="relative"><button class="menu-btn flex gap-0.5" aria-expanded="sectorsDropdownVisible" aria-haspopup="true"><span class="menu-btn">${ssrInterpolate(_ctx.$t("Sectors"))}</span><span class="menu-btn material-symbols-outlined font-light" aria-hidden="true">keyboard_arrow_down</span></button>`);
  if ($data.sectorsDropdownVisible) {
    _push(`<div class="absolute ltr:left-0 rtl:right-0 ltr:origin-top-right rtl:origin-top-left z-10 mt-2 min-w-56" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1"><div class="grid grid-cols-2 gap-2 border border-solid border-white text-[#B4B9C9] rounded-lg bg-white p-4 w-[500px]" role="none"><!--[-->`);
    ssrRenderList($data.sectorsList, (item, index) => {
      _push(`<div class="hover:text-ambassador-blue hover:underline">`);
      _push(ssrRenderComponent(_component_router_link, {
        to: `/${_ctx.$i18n.locale}/sectors/${item["slug_" + _ctx.$i18n.locale]}`,
        class: `${[item.slug_en, item.slug_ar].includes(_ctx.$route.params.slug) ? "text-ambassador-blue border-b border-solid border-ambassador-blue" : ""}`
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`${ssrInterpolate(item[`name_${_ctx.$i18n.locale}`])}`);
          } else {
            return [
              createTextVNode(
                toDisplayString(item[`name_${_ctx.$i18n.locale}`]),
                1
                /* TEXT */
              )
            ];
          }
        }),
        _: 2
        /* DYNAMIC */
      }, _parent));
      _push(`<!-- <router-link :to="{ path: \`/\${$i18n.locale}/sectors/\${item['slug_' + $i18n.locale]}\` }">{{ item[\`name_\${$i18n.locale}\`] }}</router-link> --></div>`);
    });
    _push(`<!--]--></div></div>`);
  } else {
    _push(`<!---->`);
  }
  _push(`</div><div class="relative"><button class="menu-btn flex gap-0.5" aria-expanded="modulesDropdownVisible" aria-haspopup="true"><span class="menu-btn">${ssrInterpolate(_ctx.$t("Modules"))}</span><span class="menu-btn material-symbols-outlined font-light" aria-hidden="true">keyboard_arrow_down</span></button>`);
  if ($data.modulesDropdownVisible) {
    _push(`<div class="absolute ltr:left-0 rtl:right-0 ltr:origin-top-right rtl:origin-top-left z-10 mt-2 min-w-56" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1"><div class="grid xl:grid-cols-3 grid-cols-2 gap-3 border border-solid border-white text-[#B4B9C9] rounded-lg bg-white p-4 xl:w-[850px] w-[600px]" role="none"><!--[-->`);
    ssrRenderList($data.modulesList, (item, index) => {
      _push(`<div class="hover:text-ambassador-blue hover:underline">`);
      _push(ssrRenderComponent(_component_router_link, {
        to: `/${_ctx.$i18n.locale}/modules/${item["slug_" + _ctx.$i18n.locale]}`,
        class: `text-start ${[item.slug_en, item.slug_ar].includes(_ctx.$route.params.slug) ? "text-ambassador-blue border-b border-solid border-ambassador-blue" : ""}`
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`${ssrInterpolate(item[`name_${_ctx.$i18n.locale}`])}`);
          } else {
            return [
              createTextVNode(
                toDisplayString(item[`name_${_ctx.$i18n.locale}`]),
                1
                /* TEXT */
              )
            ];
          }
        }),
        _: 2
        /* DYNAMIC */
      }, _parent));
      _push(`<!-- <router-link :to="{ path: \`/\${$i18n.locale}/modules/\${item['slug_' + $i18n.locale]}\` }">{{ item[\`name_\${$i18n.locale}\`] }}</router-link> --></div>`);
    });
    _push(`<!--]--></div></div>`);
  } else {
    _push(`<!---->`);
  }
  _push(`</div>`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "clients" },
    "active-class": `${_ctx.$route.name === "home" ? "text-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "text-amour" : "text-ambassador-blue"} font-semibold border-b-2 border-solid ${_ctx.$route.name === "home" ? "border-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "border-amour" : "border-ambassador-blue"}`
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Clients"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Clients")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "blogs" },
    "active-class": `${_ctx.$route.name === "home" ? "text-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "text-amour" : "text-ambassador-blue"} font-semibold border-b-2 border-solid ${_ctx.$route.name === "home" ? "border-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "border-amour" : "border-ambassador-blue"}`
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Blogs"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Blogs")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "contact-us" },
    "active-class": `${_ctx.$route.name === "home" ? "text-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "text-amour" : "text-ambassador-blue"} font-semibold border-b-2 border-solid ${_ctx.$route.name === "home" ? "border-white" : $data.redHeaderList.includes(_ctx.$route.name) ? "border-amour" : "border-ambassador-blue"}`
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Contact Us"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Contact Us")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`</div></div><div class="${ssrRenderClass(`flex items-center xl:gap-4 gap-2 font-medium text-sm ${$data.whiteHeaderList.includes(_ctx.$route.name) ? "text-carbon" : "text-white"}`)}">`);
  _push(ssrRenderComponent(_component_router_link, {
    to: $options.languageSwitchHref,
    class: `flex items-center shrink-0 cursor-pointer select-none sm:py-2 py-1 sm:px-4 px-2 rounded-md border border-solid bg-[#F8FAFF1A] ${$data.whiteHeaderList.includes(_ctx.$route.name) ? "border-carbon" : "border-white"}`
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("English"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("English")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`<p class="material-symbols-rounded cursor-pointer font-medium lg:hidden block">menu</p></div></div><!-- Sidebar --><div class="${ssrRenderClass(`${$data.sidebarActive ? "fixed opacity-100" : "opacity-0"} inset-0 bg-[#4D4D4D70] transition-opacity duration-500 ease-in-out`)}"></div><div class="${ssrRenderClass([$data.sidebarActive ? "inset-0" : "-inset-full", "fixed top-0 bottom-0 h-dvh w-full transition-all duration-300"])}"><div class="relative h-full w-72 overflow-y-auto shadow-xl bg-[#EB5757]"><div class="flex justify-between items-center sticky top-0 px-4 py-6 bg-[#EB5757]">`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "home" },
    class: "shrink-0"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`<img${ssrRenderAttr("src", _imports_3)} class="w-28" alt="Value plus logo"${_scopeId}>`);
      } else {
        return [
          createVNode("img", {
            src: _imports_3,
            class: "w-28",
            alt: "Value plus logo"
          })
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`<p class="material-symbols-rounded cursor-pointer text-xl font-semibold text-white">close</p></div><div class="p-6 flex flex-col gap-4 text-white font-medium">`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "home" },
    "exact-active-class": "text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue w-fit"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Home"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Home")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`<div><p>${ssrInterpolate(_ctx.$t("Sectors"))}</p><!--[-->`);
  ssrRenderList($data.sectorsList, (item, index) => {
    _push(`<div class="text-sm font-normal mt-1.5 ps-3 flex items-center gap-1.5"><span class="rounded-full w-1 h-1 bg-white inline-block shrink-0"></span>`);
    _push(ssrRenderComponent(_component_router_link, {
      to: `/${_ctx.$i18n.locale}/sectors/${item["slug_" + _ctx.$i18n.locale]}`,
      class: `${[item.slug_en, item.slug_ar].includes(_ctx.$route.params.slug) ? "text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue" : ""}`
    }, {
      default: withCtx((_, _push2, _parent2, _scopeId) => {
        if (_push2) {
          _push2(`${ssrInterpolate(item[`name_${_ctx.$i18n.locale}`])}`);
        } else {
          return [
            createTextVNode(
              toDisplayString(item[`name_${_ctx.$i18n.locale}`]),
              1
              /* TEXT */
            )
          ];
        }
      }),
      _: 2
      /* DYNAMIC */
    }, _parent));
    _push(`<!-- <router-link :to="{ path: \`/\${$i18n.locale}/sectors/\${item['slug_' + $i18n.locale]}\` }" active-class="text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue" class="truncate">{{ item[\`name_\${$i18n.locale}\`] }}</router-link> --></div>`);
  });
  _push(`<!--]--></div><div><p>${ssrInterpolate(_ctx.$t("Modules"))}</p><!--[-->`);
  ssrRenderList($data.modulesList, (item, index) => {
    _push(`<div class="text-sm font-normal mt-1.5 ps-3 flex items-center gap-1.5 truncate"><span class="rounded-full w-1 h-1 bg-white inline-block shrink-0"></span>`);
    _push(ssrRenderComponent(_component_router_link, {
      to: `/${_ctx.$i18n.locale}/modules/${item["slug_" + _ctx.$i18n.locale]}`,
      class: `truncate ${[item.slug_en, item.slug_ar].includes(_ctx.$route.params.slug) ? "text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue" : ""}`
    }, {
      default: withCtx((_, _push2, _parent2, _scopeId) => {
        if (_push2) {
          _push2(`${ssrInterpolate(item[`name_${_ctx.$i18n.locale}`])}`);
        } else {
          return [
            createTextVNode(
              toDisplayString(item[`name_${_ctx.$i18n.locale}`]),
              1
              /* TEXT */
            )
          ];
        }
      }),
      _: 2
      /* DYNAMIC */
    }, _parent));
    _push(`<!-- <router-link :to="{ path: \`/\${$i18n.locale}/modules/\${item['slug_' + $i18n.locale]}\` }" active-class="text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue" class="truncate">{{ item[\`name_\${$i18n.locale}\`] }}</router-link> --></div>`);
  });
  _push(`<!--]--></div>`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "clients" },
    "active-class": "text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue w-fit"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Clients"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Clients")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "blogs" },
    "active-class": "text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue w-fit"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Blogs"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Blogs")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "contact-us" },
    "active-class": "text-ambassador-blue font-semibold border-b-2 border-solid border-ambassador-blue w-fit"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Contact Us"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Contact Us")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`</div></div></div></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("src/components/Navbar.vue");
  return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
};
const Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
/*! src/assets/images/lang-ar.png [vike:pluginModuleBanner] */
const arFlag = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAATCAYAAACKsM07AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHESURBVHgBtZVLKERRGMf/52I8xhgLFJlh5RHy2pGyUhaSlVIeK9bKHmtLu1mRUlZCGmxQWA1JZMiCmZqpedS8CzXH990xNcYdapr7697Ovd899/+/3znf1xUgaqd75gSUcQlZjYIhN/1btxuibqZvGVKuQAcE5KJC4nPQCQmxrNDYDP2oLtaKVlWY1NFa04B715N6b/4++ZpjkUT0x/zM+0w0DVh4cmgMFhp3LvYRjscw0N6PMImM9g/j4e2ZBCOwX59jaWKBDJ1w+7009+CXlqKdQSUstfXqlzJ8zXRZW1VxzsQd8JJpH1wBD3g7+dBC04DTtTvOMEhfPT8yxbulvs8ZWGpSxh1kxiZRipmNplz62gbhRAydLEBp2463U8sTT63xPWVw+eggcQ/M5SZ1GY8cp2ikUYsiY3f9SnaQl6DUYMAVCfnDQZSVlMJ+cwpfJIgr5zXePz8oHoCB4uuHG+hoasPNyx18NDcbUTfdK6EjCnRGd4Pi/yZwFVUZU43EVZRuNqbT2oIHqqi1XVv+BraT7ZzPuILSPZK3wV9wqbrVRssN70EI+vGqJCFXoRdSbqodzn80SDGLAiEgQlIk9/iP9gW5168A1ZozqgAAAABJRU5ErkJggg==";
/*! src/assets/images/lang-en.png [vike:pluginModuleBanner] */
const enFlag = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMcSURBVHgBtVZLSFRRGP7OzGjmqExF6kwWN7JSCB/QQl1NrqQW2cZNRIogGIQKQUtHaCMEM2hISWBQLaJApUW7VNooRCM+SChyYnA0F87ovO7r3NO5Y6PM45pO9MHh3v/8537fOf9/zn8uwQEQnG5bgWzpAWNOgAm1bE1w03GoGkIyNc0zYFIFmaieX/EZcZiydVY1uIV3771TBZIpCKa5iq0WZ2/XVUH3EQLkmWHLN2tO/urOA1v9Xndp7GtdlZCNi6R3jL6c7XGPzLnKS622SFRG5+1aPH+9gGJrHuzFBCPdlXtj46IEqtJd43hhyFR5ccDhcHgMBaqahvvtp4+70omT9qe5NTx9fGNvvCLLkCQxfY4uu90+kCFQ3TjcU2Q1e9paq/FmYiWFOClUFl3HcGNon4oxxCQKlqZAlxb7Lnz46NkT0GP+8H6Td/DJrM1eaoXRCqaeTcKjjaeQiQoBZRmRDikg9Xry/wgMjdnLCtuNiJN2OYlgqMafwiTLGhS+rTJQUDAtPBq8RvTZFxcdW9WJPKOfkb6C3bmxrDnQoSoKRDGObBBF8YS5+15fu3dps+WnfztBdqftCr4sbuLbjy0oCk0QJ+0iIuN6hQi2EdhvvwKQ19b4cyOjYXlBIg0to1NUVZ2HWUG2HPA8I6ZkPU46psnlRo+Xk9jOOkrgD+wkektKjumc2AlLKfaZsB8j9G2qAG8x2VDAR8KRKMM/IhLeMfSZ8J9BNm41rxKVCsgRuyEycJpMIQsL+H08UQJyFeAKmnGS5y35D1wzZkeFEzmCUg1aXMzuk8RJEgwGbZa8/CByhKqqEOMxI/f5xDbfejU2xba3nMgBEj+M+oFMBzl56sW5zq6OhMB6Q5VAKPXymmXDEXGoYqdjo7W511xT78ZRwDMcjWfOni6nleskwuGwC8TUj0PCoNAN8AvHlTQy1rYdifSS9UA/v3z/Gq5oLMav7N1SzaxFIWK1HnxlJqHnBBp18de7BtxQKIFM9z6f5jHvyPZ3QXAAdCGmqq3EjJtEI3X6JtAPlqoRHyf3MZCZCERP/bwvZMTxG1hdsy9bsUvOAAAAAElFTkSuQmCC";
/*! src/components/Footerbar.vue [vike:pluginModuleBanner] */
const _sfc_main$1 = {
  data() {
    return {
      arFlag,
      enFlag,
      footerData: {},
      sectorsList: []
    };
  },
  computed: {
    languageSwitchHref() {
      const current = this.$route.fullPath || this.$route.path || "/";
      const nextLang = this.$route.params.lang === "en" ? "ar" : "en";
      if (/^\/(en|ar)(\/|$)/.test(current)) {
        return current.replace(/^\/(en|ar)(?=\/|\?|$)/, `/${nextLang}`);
      }
      return `/${nextLang}${current.startsWith("/") ? "" : "/"}${current}`;
    }
  },
  methods: {
    async loadFooterData() {
      try {
        const response = await axios.get("https://admin.valueerp.net/api/footer");
        this.footerData = response.data.data;
      } catch (error) {
      } finally {
      }
    },
    async loadSectorsList() {
      try {
        const response = await axios.get("https://admin.valueerp.net/api/sectorsModules");
        this.sectorsList = response.data.data.data;
      } catch (error) {
      } finally {
      }
    }
  },
  created() {
    if (typeof window !== "undefined") {
      this.loadFooterData();
      this.loadSectorsList();
    }
  },
  async serverPrefetch() {
    await Promise.all([this.loadFooterData(), this.loadSectorsList()]);
  }
};
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_router_link = resolveComponent("router-link");
  _push(`<div${ssrRenderAttrs(_attrs)}><div class="bg-ambassador-blue text-white"><div class="max-w-screen-2xl mx-auto xl:px-20 md:p-12 sm:p-8 p-6"><div class="grid md:grid-cols-2 grid-cols-1 gap-10 items-center"><div class="flex xl:gap-20 lg:gap-14 gap-10 md:justify-start justify-between flex-wrap md:order-1 order-2"><div class="leading-7"><p class="font-medium mb-2">${ssrInterpolate(_ctx.$t("Sectors"))}</p><!--[-->`);
  ssrRenderList($data.sectorsList, (item, index) => {
    _push(`<div>`);
    _push(ssrRenderComponent(_component_router_link, {
      to: `/${_ctx.$i18n.locale}/sectors/${item["slug_" + _ctx.$i18n.locale]}`
    }, {
      default: withCtx((_, _push2, _parent2, _scopeId) => {
        if (_push2) {
          _push2(`${ssrInterpolate(item[`name_${_ctx.$i18n.locale}`])}`);
        } else {
          return [
            createTextVNode(
              toDisplayString(item[`name_${_ctx.$i18n.locale}`]),
              1
              /* TEXT */
            )
          ];
        }
      }),
      _: 2
      /* DYNAMIC */
    }, _parent));
    _push(`<!-- <router-link :to="{ path: \`/\${$i18n.locale}/sectors/\${item['slug_' + $i18n.locale]}\` }" class="block font-light">{{ item[\`name_\${$i18n.locale}\`] }}</router-link> --></div>`);
  });
  _push(`<!--]--></div><div class="leading-7">`);
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "clients" },
    class: "font-medium mb-2 block"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Clients"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Clients")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "blogs" },
    class: "font-medium mb-2 block"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Blogs"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Blogs")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(ssrRenderComponent(_component_router_link, {
    to: { name: "contact-us" },
    class: "font-medium mb-2 block"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`${ssrInterpolate(_ctx.$t("Contact Us"))}`);
      } else {
        return [
          createTextVNode(
            toDisplayString(_ctx.$t("Contact Us")),
            1
            /* TEXT */
          )
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`</div></div><div class="text-center md:order-2 order-1"><img${ssrRenderAttr("src", _imports_0)} class="w-32 m-auto" alt="Value plus logo"><div class="mt-8 pb-4 ltr:text-left rtl:text-right leading-5 font-medium text-xs border-b border-solid border-white"><!-- <p>{{ 'Modern Speed is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.' }}</p>
              <p>{{ 'Modern Speed unique value proposition is to be at the same time very easy to use and fully integrated.' }}</p> --><p class="font-bold text-xl mb-2">${ssrInterpolate(_ctx.$t("Certified by"))}:</p><div class="flex gap-2 items-center justify-center"><!--[-->`);
  ssrRenderList($data.footerData.certified, (item, index) => {
    _push(`<div><img${ssrRenderAttr("src", item.image)}${ssrRenderAttr("alt", `logo-${item.id}`)}></div>`);
  });
  _push(`<!--]--></div></div><div class="flex justify-between gap-4 mt-4"><div class="flex gap-3 items-center justify-center"><!--[-->`);
  ssrRenderList($data.footerData.social_media, (item, index) => {
    _push(`<div><a${ssrRenderAttr("href", item.link)} target="_blank" rel="noopener noreferrer"><img class="max-w-5 max-h-5"${ssrRenderAttr("src", item.image)}${ssrRenderAttr("alt", item.type)}></a></div>`);
  });
  _push(`<!--]--></div>`);
  _push(ssrRenderComponent(_component_router_link, {
    to: $options.languageSwitchHref,
    class: "w-fit ms-auto flex gap-1 items-center cursor-pointer select-none py-1 px-2 rounded-md border border-solid bg-[#F8FAFF1A] border-white"
  }, {
    default: withCtx((_, _push2, _parent2, _scopeId) => {
      if (_push2) {
        _push2(`<p class="text-sm text-white"${_scopeId}>${ssrInterpolate(_ctx.$t("English"))}</p><img${ssrRenderAttr("src", _ctx.$route.params.lang === "en" ? $data.arFlag : $data.enFlag)} class="w-4 h-4 rounded-full"${ssrRenderAttr("alt", _ctx.$route.params.lang === "en" ? "Arabic flag" : "English flag")}${_scopeId}>`);
      } else {
        return [
          createVNode(
            "p",
            { class: "text-sm text-white" },
            toDisplayString(_ctx.$t("English")),
            1
            /* TEXT */
          ),
          createVNode("img", {
            src: _ctx.$route.params.lang === "en" ? $data.arFlag : $data.enFlag,
            class: "w-4 h-4 rounded-full",
            alt: _ctx.$route.params.lang === "en" ? "Arabic flag" : "English flag"
          }, null, 8, ["src", "alt"])
        ];
      }
    }),
    _: 1
    /* STABLE */
  }, _parent));
  _push(`</div></div></div></div></div><div class="bg-[#122340] text-center p-2"><p class="text-[#EDEDED] text-sm font-light">${ssrInterpolate("Copyright © 2024 Modern Speed.")}</p></div></div>`);
}
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("src/components/Footerbar.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const Footerbar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
/*! src/layouts/FullPage.vue [vike:pluginModuleBanner] */
const _sfc_main = {
  watch: {
    "$route.params.lang"() {
      this.changeLocale();
    }
  },
  methods: {
    changeLocale() {
      var _a;
      this.$i18n.locale = this.$route.params.lang ? this.$route.params.lang : "en";
      if (typeof document !== "undefined") {
        (_a = document.querySelector("html")) == null ? void 0 : _a.setAttribute("dir", this.$route.params.lang === "ar" ? "rtl" : "ltr");
      }
    }
  },
  components: {
    Navbar,
    Footerbar
  },
  created() {
    this.changeLocale();
  }
};
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_navbar = resolveComponent("navbar");
  const _component_router_view = resolveComponent("router-view");
  const _component_footerbar = resolveComponent("footerbar");
  _push(`<div${ssrRenderAttrs(_attrs)}>`);
  if (_ctx.$route.name !== "error-404") {
    _push(ssrRenderComponent(_component_navbar, { class: "relative z-10" }, null, _parent));
  } else {
    _push(`<!---->`);
  }
  _push(ssrRenderComponent(_component_router_view, { class: "min-h-dvh" }, null, _parent));
  if (_ctx.$route.name !== "error-404") {
    _push(ssrRenderComponent(_component_footerbar, { class: "md:mt-20 mt-14" }, null, _parent));
  } else {
    _push(`<!---->`);
  }
  _push(`</div>`);
}
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/layouts/FullPage.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const FullPage = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
export {
  FullPage as default
};
