import { Carousel, Slide } from 'vue3-carousel/dist/carousel';
import { _ as _sfc_main$1 } from './BlogCard-z4kvdhKV.mjs';
import { useSSRContext, mergeProps, withCtx, createVNode, openBlock, createBlock, Fragment, renderList } from 'vue';
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderComponent, ssrRenderList } from 'vue/server-renderer';

const _sfc_main = {
  __name: "BlogWhatsHappening",
  __ssrInlineRender: true,
  props: {
    items: {
      required: true
    }
  },
  setup(__props) {
    const breakpoints = {
      600: {
        itemsToShow: 2
      },
      992: {
        itemsToShow: 3
      }
    };
    return (_ctx, _push, _parent, _attrs) => {
      const _component_carousel = Carousel;
      const _component_slide = Slide;
      const _component_blog_card = _sfc_main$1;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "container py-11" }, _attrs))}><div>`);
      ssrRenderSlot(_ctx.$slots, "header", {}, null, _push, _parent);
      _push(`</div><div>`);
      _push(ssrRenderComponent(_component_carousel, {
        breakpoints,
        "items-to-show": 1,
        "wrap-around": true,
        transition: 1200,
        "pause-autoplay-on-hover": true,
        dir: _ctx.$i18n.locale == "ar" ? "rtl" : "ltr"
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<!--[-->`);
            ssrRenderList(__props.items, (item) => {
              _push2(ssrRenderComponent(_component_slide, {
                key: item.id
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(`<div class="mx-1"${_scopeId2}>`);
                    _push3(ssrRenderComponent(_component_blog_card, { item }, null, _parent3, _scopeId2));
                    _push3(`</div>`);
                  } else {
                    return [
                      createVNode("div", { class: "mx-1" }, [
                        createVNode(_component_blog_card, { item }, null, 8, ["item"])
                      ])
                    ];
                  }
                }),
                _: 2
              }, _parent2, _scopeId));
            });
            _push2(`<!--]-->`);
          } else {
            return [
              (openBlock(true), createBlock(Fragment, null, renderList(__props.items, (item) => {
                return openBlock(), createBlock(_component_slide, {
                  key: item.id
                }, {
                  default: withCtx(() => [
                    createVNode("div", { class: "mx-1" }, [
                      createVNode(_component_blog_card, { item }, null, 8, ["item"])
                    ])
                  ]),
                  _: 2
                }, 1024);
              }), 128))
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</div><div>`);
      ssrRenderSlot(_ctx.$slots, "footer", {}, null, _push, _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/BlogWhatsHappening.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};

export { _sfc_main as _ };
//# sourceMappingURL=BlogWhatsHappening-Cce5xsjg.mjs.map
