import { defineComponent, openBlock, createBlock, normalizeStyle, normalizeClass, withModifiers } from "vue";
import { n as _export_sfc, a as _sfc_main$1 } from "./index2.js";
import "vant";
import "@wltech/svg";
import "dayjs";
import "qs";
import "vuedraggable";
import "vue-router";
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    data: { default: "" },
    listItem: { default: () => {
      return {
        imgWidth: "30px",
        imgHeight: "30px",
        fit: "cover"
      };
    } }
  },
  emits: ["onItem"],
  setup(__props, { emit }) {
    const props = __props;
    const onItem = () => {
      var _a;
      if (!((_a = props.listItem) == null ? void 0 : _a.allowClick))
        return;
      emit("onItem", {
        data: props.data,
        listItem: props.listItem
      });
    };
    return (_ctx, _cache) => {
      var _a, _b;
      return openBlock(), createBlock(_sfc_main$1, {
        src: __props.data,
        alt: "",
        style: normalizeStyle({ width: __props.listItem.imgWidth, height: __props.listItem.imgHeight }),
        class: normalizeClass(["card-image", {
          "card-image--clickable": ((_a = props.listItem) == null ? void 0 : _a.allowClick) && ((_b = props.listItem) == null ? void 0 : _b.viewType)
        }]),
        fit: __props.listItem.fit || "cover",
        onClick: withModifiers(onItem, ["stop"])
      }, null, 8, ["src", "style", "class", "fit", "onClick"]);
    };
  }
});
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-120fe3bc"]]);
export { index as default };
