"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;
