"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../hooks/use-namespace/index.js");
const constants = require("./constants.js");
const carouselItem = require("./carousel-item.js");
const useCarouselItem = require("./use-carousel-item.js");
const Vue = require("vue");
var carousel_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ Vue.defineComponent({
  name: constants.CAROUSEL_ITEM_NAME,
  __name: "carousel-item",
  props: carouselItem.carouselItemProps,
  setup(__props) {
    const props = __props;
    const ns = index.useNamespace("carousel");
    const { carouselItemRef, active, animating, hover, inStage, isVertical, translate, isCardType, scale, ready, handleItemClick } = useCarouselItem.useCarouselItem(props);
    const itemKls = Vue.computed(() => [
      ns.e("item"),
      ns.is("active", active.value),
      ns.is("in-stage", inStage.value),
      ns.is("hover", hover.value),
      ns.is("animating", animating.value),
      {
        [ns.em("item", "card")]: isCardType.value,
        [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
      }
    ]);
    const itemStyle = Vue.computed(() => {
      return { transform: [`${`translate${Vue.unref(isVertical) ? "Y" : "X"}`}(${Vue.unref(translate)}px)`, `scale(${Vue.unref(scale)})`].join(" ") };
    });
    return (_ctx, _cache) => {
      return Vue.withDirectives((Vue.openBlock(), Vue.createElementBlock("div", {
        ref_key: "carouselItemRef",
        ref: carouselItemRef,
        class: Vue.normalizeClass(itemKls.value),
        style: Vue.normalizeStyle(itemStyle.value),
        onClick: _cache[0] || (_cache[0] = (...args) => Vue.unref(handleItemClick) && Vue.unref(handleItemClick)(...args))
      }, [Vue.unref(isCardType) ? Vue.withDirectives((Vue.openBlock(), Vue.createElementBlock("div", {
        key: 0,
        class: Vue.normalizeClass(Vue.unref(ns).e("mask"))
      }, null, 2)), [[Vue.vShow, !Vue.unref(active)]]) : Vue.createCommentVNode("v-if", true), Vue.renderSlot(_ctx.$slots, "default")], 6)), [[Vue.vShow, Vue.unref(ready)]]);
    };
  }
});
exports.default = carousel_item_vue_vue_type_script_setup_true_lang_default;
