"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uCellItem_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
if (!Array) {
  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  _easycom_u_icon2();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
if (!Math) {
  _easycom_u_icon();
}
const __default__ = {
  name: "u-cell-item",
  options: {
    addGlobalClass: true,
    virtualHost: true,
    styleIsolation: "shared"
  }
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  ...__default__,
  props: uni_modules_uviewPro_components_uCellItem_types.CellItemProps,
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const emit = __emit;
    const props = __props;
    const $slots = common_vendor.useSlots();
    const arrowStyle = common_vendor.computed(() => {
      let style = {};
      if (props.arrowDirection === "up")
        style.transform = "rotate(-90deg)";
      else if (props.arrowDirection === "down")
        style.transform = "rotate(90deg)";
      else
        style.transform = "rotate(0deg)";
      return style;
    });
    function onClick() {
      emit("click", props.index);
    }
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: _ctx.icon
      }, _ctx.icon ? {
        b: common_vendor.p({
          size: _ctx.iconSize,
          name: _ctx.icon,
          ["custom-style"]: _ctx.iconStyle
        })
      } : {}, {
        c: _ctx.title !== ""
      }, _ctx.title !== "" ? {
        d: common_vendor.t(_ctx.title)
      } : {}, {
        e: _ctx.label || common_vendor.unref($slots).label
      }, _ctx.label || common_vendor.unref($slots).label ? common_vendor.e({
        f: _ctx.label !== ""
      }, _ctx.label !== "" ? {
        g: common_vendor.t(_ctx.label)
      } : {}, {
        h: common_vendor.s(_ctx.labelStyle)
      }) : {}, {
        i: common_vendor.s({
          width: _ctx.titleWidth ? _ctx.titleWidth + "rpx" : "auto"
        }),
        j: common_vendor.s(_ctx.titleStyle),
        k: _ctx.value !== ""
      }, _ctx.value !== "" ? {
        l: common_vendor.t(_ctx.value)
      } : {}, {
        m: common_vendor.s(_ctx.valueStyle),
        n: common_vendor.unref($slots)["right-icon"]
      }, common_vendor.unref($slots)["right-icon"] ? {} : {}, {
        o: _ctx.arrow
      }, _ctx.arrow ? {
        p: common_vendor.s(arrowStyle.value),
        q: common_vendor.p({
          name: "arrow-right"
        })
      } : {}, {
        r: common_vendor.o(onClick, "2d"),
        s: common_vendor.n({
          "u-border-bottom": _ctx.borderBottom,
          "u-border-top": _ctx.borderTop,
          "u-col-center": _ctx.center,
          "u-cell--required": _ctx.required
        }),
        t: common_vendor.n(_ctx.customClass),
        v: _ctx.hoverClass,
        w: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
          backgroundColor: _ctx.bgColor
        }, _ctx.customStyle))
      });
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-78f27ce9"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-cell-item/u-cell-item.js.map
