import { _ as _sfc_main$2 } from './MetaTags-C8KDkLj_.mjs';
import { u as useI18n, g as useRoute, c as useHead, l as useAsyncData, f as useRuntimeConfig, i as useLocalePath, _ as _sfc_main$g, k as __nuxt_component_0$2 } from './server.mjs';
import { ref, withAsyncContext, unref, useSSRContext, withCtx, createTextVNode, toDisplayString, createVNode } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
import './components-BFogvFSQ.mjs';
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: "CareerCard",
  __ssrInlineRender: true,
  props: {
    items: {
      required: true
    }
  },
  setup(__props) {
    const localePath = useLocalePath();
    function randomColor() {
      const letters = "0123456789ABCDEF";
      let color = "#";
      for (let i = 0; i < 6; i++) {
        color += letters[Math.floor(Math.random() * 16)];
      }
      return color;
    }
    return (_ctx, _push, _parent, _attrs) => {
      const _component_nuxt_img = _sfc_main$g;
      const _component_nuxt_link = __nuxt_component_0$2;
      _push(`<!--[-->`);
      ssrRenderList(__props.items, (item) => {
        var _a;
        _push(`<div class="careerCard p-5 flex flex-col h-full rounded-lg border border-[#f4f4f9]"><div class="min-h-[250px] space-y-5"><div class="p-4 px-5 w-fit rounded-full text-white" style="${ssrRenderStyle({ backgroundColor: randomColor() })}"><i class="${ssrRenderClass(item.icon)}"></i></div><p class="font-semibold text-lg text-primary">${ssrInterpolate(item.title)}</p><div class="flex flex-wrap items-center gap-3"><div class="badge"><div class="flex gap-1 px-2">`);
        _push(ssrRenderComponent(_component_nuxt_img, {
          src: "location.svg",
          alt: "location",
          class: "w-[12px] h-auto"
        }, null, _parent));
        _push(`<p>${ssrInterpolate(item.location)}</p></div></div><div class="badge"><div class="flex gap-1 px-2">`);
        _push(ssrRenderComponent(_component_nuxt_img, {
          src: "calender.svg",
          alt: "calender",
          class: "w-[12px] h-auto"
        }, null, _parent));
        _push(`<p>${ssrInterpolate(item.experience_years)}</p></div></div><div class="badge"><div class="flex gap-1 px-2">`);
        _push(ssrRenderComponent(_component_nuxt_img, {
          src: "book.svg",
          alt: "book",
          class: "w-[12px] h-auto"
        }, null, _parent));
        _push(`<p>${ssrInterpolate(item.experience_position)}</p></div></div></div><p class="line-clamp-2">${(_a = item.description) != null ? _a : ""}</p>`);
        _push(ssrRenderComponent(_component_nuxt_link, {
          class: "text-primary flex items-center text-sm font-semibold gap-3 w-fit",
          to: unref(localePath)(`/careers/${item.slug}`),
          "aria-label": item.slug
        }, {
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(`${ssrInterpolate(_ctx.$t("BUTTONS.viewDetails"))} <i class="${ssrRenderClass(
                _ctx.$i18n.locale == "en" ? "fas fa-arrow-right" : "fas fa-arrow-left"
              )}"${_scopeId}></i>`);
            } else {
              return [
                createTextVNode(toDisplayString(_ctx.$t("BUTTONS.viewDetails")) + " ", 1),
                createVNode("i", {
                  class: _ctx.$i18n.locale == "en" ? "fas fa-arrow-right" : "fas fa-arrow-left"
                }, null, 2)
              ];
            }
          }),
          _: 2
        }, _parent));
        _push(`</div></div>`);
      });
      _push(`<!--]-->`);
    };
  }
};
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/career/CareerCard.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const _sfc_main = {
  __name: "index",
  __ssrInlineRender: true,
  async setup(__props) {
    let __temp, __restore;
    const config = useRuntimeConfig();
    const i18n = useI18n();
    const activeButton = ref("all");
    const metas = ref(null);
    const pageData = ref(null);
    const careersCats = ref(null);
    const route = useRoute();
    useHead({
      title: i18n.t("NAV.careers")
    });
    [__temp, __restore] = withAsyncContext(() => useAsyncData("career", () => {
      $fetch("career", {
        method: "GET",
        baseURL: config.public.baseURL,
        params: {
          page: route.query.page || 1,
          category_id: activeButton.value == "all" ? "" : activeButton.value
        },
        headers: {
          "Accept-Language": i18n.locale.value
        }
      }).then((res) => {
        pageData.value = res.data;
        metas.value = res.data.metas;
      }).catch((err) => console.log(err));
    })), await __temp, __restore();
    return (_ctx, _push, _parent, _attrs) => {
      const _component_meta_tags = _sfc_main$2;
      const _component_career_card = _sfc_main$1;
      _push(`<div${ssrRenderAttrs(_attrs)}>`);
      if (unref(metas)) {
        _push(ssrRenderComponent(_component_meta_tags, { metas: unref(metas) }, null, _parent));
      } else {
        _push(`<!---->`);
      }
      _push(`<div class="container py-11" id="portfolios_content"><p class="text-primary font-semibold">${ssrInterpolate(_ctx.$t("Subtitle.ourJobs"))}</p><h4 class="text-2xl leading-[2.2rem] md:text-4xl font-bold mb-3 md:leading-[3.5rem]">${ssrInterpolate(_ctx.$t("TITLES.bePartOfOurMission"))}</h4><div class="flex items-center flex-wrap mt-3 mb-5 last:mb-0 lg:gap-10 md:gap-10 gap-x-6"><button class="${ssrRenderClass({
        "underlined-btn": unref(activeButton) === "all",
        unClickedbuttonJob: unref(activeButton) !== "all"
      })}">${ssrInterpolate(_ctx.$t("TITLES.all"))} <span class="${ssrRenderClass({
        "absolute left-0 bottom-0 min-w-[30px] h-1 bg-gradient-to-r rounded from-[#2A398C] via-[#35428D] to-white": unref(activeButton) === "all"
      })}"></span></button><!--[-->`);
      ssrRenderList(unref(careersCats), (cat) => {
        _push(`<button class="${ssrRenderClass([{
          "underlined-btn": unref(activeButton) === `${cat.id}`,
          unClickedbuttonJob: unref(activeButton) !== `${cat.id}`
        }, "w-fit h-[30px] font-[600]"])}">${ssrInterpolate(cat.title)} <span class="${ssrRenderClass({
          "absolute left-0 bottom-0 w-full h-1 bg-gradient-to-r rounded from-[#2A398C] via-[#35428D] to-white": unref(activeButton) === `${cat.id}`
        })}"></span></button>`);
      });
      _push(`<!--]--></div><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">`);
      _push(ssrRenderComponent(_component_career_card, { items: unref(pageData) }, null, _parent));
      _push(`</div></div></div>`);
    };
  }
};
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/careers/index.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as default };
//# sourceMappingURL=index-DdFmLAKc.mjs.map
