import { i as useLocalePath, k as __nuxt_component_0$2, _ as _sfc_main$g } from './server.mjs';
import { useSSRContext, mergeProps, unref, withCtx, createVNode, createTextVNode, toDisplayString } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderClass } from 'vue/server-renderer';

const _sfc_main = {
  __name: "BlogCard",
  __ssrInlineRender: true,
  props: {
    item: {
      required: true
    }
  },
  setup(__props) {
    const localePath = useLocalePath();
    return (_ctx, _push, _parent, _attrs) => {
      var _a;
      const _component_nuxt_link = __nuxt_component_0$2;
      const _component_nuxt_img = _sfc_main$g;
      _push(`<div${ssrRenderAttrs(mergeProps({
        "data-wow-duration": "1.3s",
        "data-wow-delay": "0s",
        class: "p-3 flex flex-col h-full bg-[#F9F9F9] rounded-xl animated wow zoomInUp blog-card"
      }, _attrs))}>`);
      _push(ssrRenderComponent(_component_nuxt_link, {
        to: unref(localePath)(`/articles/${__props.item.slug}`),
        class: "h-[230px]"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(_component_nuxt_img, {
              format: "webp",
              width: "300",
              class: "w-full h-full rounded-xl object-cover",
              height: "230",
              src: __props.item.image,
              alt: __props.item.title,
              sizes: "sm:300px md:320px lg:480px",
              loading: "lazy",
              quality: "80"
            }, null, _parent2, _scopeId));
          } else {
            return [
              createVNode(_component_nuxt_img, {
                format: "webp",
                width: "300",
                class: "w-full h-full rounded-xl object-cover",
                height: "230",
                src: __props.item.image,
                alt: __props.item.title,
                sizes: "sm:300px md:320px lg:480px",
                loading: "lazy",
                quality: "80"
              }, null, 8, ["src", "alt"])
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`<div><div class="flex gap-2 py-2 text-primary text-sm"><p><i class="fas fa-calendar"></i> ${ssrInterpolate(__props.item.published_at)}</p><p><i class="fas fa-eye"></i> ${ssrInterpolate(__props.item.views)}</p></div>`);
      _push(ssrRenderComponent(_component_nuxt_link, {
        class: "line-clamp-1 text-text font-bold text-base mb-1 !text-start",
        to: unref(localePath)(`/articles/${__props.item.slug}`)
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`${ssrInterpolate(__props.item.title)}`);
          } else {
            return [
              createTextVNode(toDisplayString(__props.item.title), 1)
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`<div class="line-clamp-3 !overflow-hidden !text-start">${(_a = __props.item.description.replace(/<[^>]*>/g, "")) != null ? _a : ""}</div></div><div class="flex items-center justify-end mt-2">`);
      _push(ssrRenderComponent(_component_nuxt_link, {
        class: "text-primary flex items-center text-sm font-medium gap-1",
        to: unref(localePath)(`/articles/${__props.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)
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</div></div>`);
    };
  }
};
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/blog/card/BlogCard.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as _ };
//# sourceMappingURL=BlogCard-z4kvdhKV.mjs.map
