import { a as Html, H as Head, M as Meta, L as Link, B as Body } from './components-BFogvFSQ.mjs';
import { w as useGlobalStore, u as useI18n, c as useHead, b as useNuxtApp, f as useRuntimeConfig, x as _sfc_main$4, y as _sfc_main$2, a as _export_sfc } from './server.mjs';
import { ref, watch, mergeProps, unref, withCtx, createVNode, renderSlot, openBlock, createBlock, createCommentVNode, useSSRContext } from 'vue';
import { ssrRenderComponent, ssrRenderSlot, ssrRenderAttrs, ssrRenderAttr } from 'vue/server-renderer';
import '../_/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:fs';
import 'node:url';
import 'ipx';
import 'node:path';
import 'unhead';
import '@unhead/shared';
import 'vue-router';
import 'vue-social-sharing';
import 'axios';
import '@headlessui/vue';
import 'yup';

const _sfc_main$1 = {
  __name: "Calls",
  __ssrInlineRender: true,
  props: {
    settings: {
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const firstPhone = ref(null);
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "calls-wrappper" }, _attrs))} data-v-271b02fe><div class="content-center flex flex-col gap-5" data-v-271b02fe>`);
      if (unref(firstPhone)) {
        _push(`<a aria-label="whats btn" target="_blank"${ssrRenderAttr("href", `https://wa.me/${unref(firstPhone)}${_ctx.$route.query.message ? "/?text=" + _ctx.$route.query.message : ""}`)} class="pulse bg-[#25d366]" data-v-271b02fe><i class="fab fa-whatsapp text-3xl" data-v-271b02fe></i></a>`);
      } else {
        _push(`<!---->`);
      }
      if (unref(firstPhone)) {
        _push(`<a aria-label="email btn"${ssrRenderAttr("href", `mailto:${props.settings.public_mails[0]}`)} class="pulse bg-primary" data-v-271b02fe><i class="fas fa-envelope text-2xl" data-v-271b02fe></i></a>`);
      } else {
        _push(`<!---->`);
      }
      _push(`</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("components/Calls.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const __nuxt_component_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-271b02fe"]]);
const _sfc_main = {
  __name: "default",
  __ssrInlineRender: true,
  setup(__props) {
    const globalStore = useGlobalStore();
    const { t, locale } = useI18n();
    const config = useRuntimeConfig();
    useHead({
      titleTemplate: `%s - ${t("NAV.name")}`
    });
    useNuxtApp().$axios;
    const settings = ref(null);
    watch(
      () => locale.value,
      () => {
        getSettings();
      }
    );
    function getSettings() {
      $fetch(`setting`, {
        baseURL: config.public.baseURL,
        headers: {
          "Accept-Language": locale.value
        }
      }).then((res) => {
        settings.value = res.data;
        globalStore.getMainServices(settings.value);
      });
    }
    return (_ctx, _push, _parent, _attrs) => {
      const _component_Html = Html;
      const _component_Head = Head;
      const _component_Meta = Meta;
      const _component_Link = Link;
      const _component_Body = Body;
      const _component_Header = _sfc_main$4;
      const _component_Footer = _sfc_main$2;
      const _component_calls = __nuxt_component_7;
      _push(ssrRenderComponent(_component_Html, mergeProps({ lang: unref(locale) }, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(_component_Head, null, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_Meta, {
                    name: "google-site-verification",
                    content: "TRBHjNKSiN5U5acO_fU_9sfar64NGrmHQ9UZ_vH0528"
                  }, null, _parent3, _scopeId2));
                  _push3(ssrRenderComponent(_component_Link, {
                    rel: "alternate",
                    href: `https://alalmiyalhura.com${unref(locale) == "ar" ? "/ar" : ""}`,
                    hreflang: unref(locale)
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_Meta, {
                      name: "google-site-verification",
                      content: "TRBHjNKSiN5U5acO_fU_9sfar64NGrmHQ9UZ_vH0528"
                    }),
                    createVNode(_component_Link, {
                      rel: "alternate",
                      href: `https://alalmiyalhura.com${unref(locale) == "ar" ? "/ar" : ""}`,
                      hreflang: unref(locale)
                    }, null, 8, ["href", "hreflang"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_Body, {
              dir: unref(locale) == "ar" ? "rtl" : "ltr"
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`<div class="flex flex-col min-h-[100vh]"${_scopeId2}>`);
                  _push3(ssrRenderComponent(_component_Header, {
                    onGetNavbar: getSettings,
                    settings: unref(settings)
                  }, null, _parent3, _scopeId2));
                  _push3(`<div class="app_wrapper" id="app_wrapper"${_scopeId2}>`);
                  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push3, _parent3, _scopeId2);
                  _push3(`</div>`);
                  _push3(ssrRenderComponent(_component_Footer, {
                    class: "mt-auto",
                    onGetNavbar: getSettings,
                    settings: unref(settings)
                  }, null, _parent3, _scopeId2));
                  _push3(`</div>`);
                  if (unref(settings)) {
                    _push3(ssrRenderComponent(_component_calls, { settings: unref(settings) }, null, _parent3, _scopeId2));
                  } else {
                    _push3(`<!---->`);
                  }
                } else {
                  return [
                    createVNode("div", { class: "flex flex-col min-h-[100vh]" }, [
                      createVNode(_component_Header, {
                        onGetNavbar: getSettings,
                        settings: unref(settings)
                      }, null, 8, ["settings"]),
                      createVNode("div", {
                        class: "app_wrapper",
                        id: "app_wrapper"
                      }, [
                        renderSlot(_ctx.$slots, "default")
                      ]),
                      createVNode(_component_Footer, {
                        class: "mt-auto",
                        onGetNavbar: getSettings,
                        settings: unref(settings)
                      }, null, 8, ["settings"])
                    ]),
                    unref(settings) ? (openBlock(), createBlock(_component_calls, {
                      key: 0,
                      settings: unref(settings)
                    }, null, 8, ["settings"])) : createCommentVNode("", true)
                  ];
                }
              }),
              _: 3
            }, _parent2, _scopeId));
          } else {
            return [
              createVNode(_component_Head, null, {
                default: withCtx(() => [
                  createVNode(_component_Meta, {
                    name: "google-site-verification",
                    content: "TRBHjNKSiN5U5acO_fU_9sfar64NGrmHQ9UZ_vH0528"
                  }),
                  createVNode(_component_Link, {
                    rel: "alternate",
                    href: `https://alalmiyalhura.com${unref(locale) == "ar" ? "/ar" : ""}`,
                    hreflang: unref(locale)
                  }, null, 8, ["href", "hreflang"])
                ]),
                _: 1
              }),
              createVNode(_component_Body, {
                dir: unref(locale) == "ar" ? "rtl" : "ltr"
              }, {
                default: withCtx(() => [
                  createVNode("div", { class: "flex flex-col min-h-[100vh]" }, [
                    createVNode(_component_Header, {
                      onGetNavbar: getSettings,
                      settings: unref(settings)
                    }, null, 8, ["settings"]),
                    createVNode("div", {
                      class: "app_wrapper",
                      id: "app_wrapper"
                    }, [
                      renderSlot(_ctx.$slots, "default")
                    ]),
                    createVNode(_component_Footer, {
                      class: "mt-auto",
                      onGetNavbar: getSettings,
                      settings: unref(settings)
                    }, null, 8, ["settings"])
                  ]),
                  unref(settings) ? (openBlock(), createBlock(_component_calls, {
                    key: 0,
                    settings: unref(settings)
                  }, null, 8, ["settings"])) : createCommentVNode("", true)
                ]),
                _: 3
              }, 8, ["dir"])
            ];
          }
        }),
        _: 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 };
//# sourceMappingURL=default-DsQFXQTO.mjs.map
