"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
  Icon();
}
const Icon = () => "../icon/index.js";
const _sfc_main = {
  __name: "index",
  props: {
    // 按钮文本
    text: {
      type: String,
      default: "增加"
    },
    // 是否禁用
    disabled: {
      type: Boolean,
      default: false
    },
    // 按钮高度
    height: {
      type: [String, Number],
      default: "36px"
    },
    // 前置图标名称
    preIcon: {
      type: String,
      default: ""
    },
    // 后置图标名称
    suffixIcon: {
      type: String,
      default: ""
    },
    // 图标大小
    iconSize: {
      type: [String, Number],
      default: "32"
    },
    // 图标颜色
    iconColor: {
      type: String,
      default: "#585d6e"
    },
    // 自定义按钮样式
    customStyle: {
      type: Object,
      default: () => ({})
    },
    // 跳转链接（兼容原JSP用法）
    href: {
      type: String,
      default: ""
    }
  },
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const buttonStyle = common_vendor.computed(() => ({
      height: typeof props.height === "number" ? `${props.height}px` : props.height,
      ...props.customStyle
    }));
    const handleClick = () => {
      emit("click");
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: __props.preIcon || _ctx.$slots.preIcon
      }, __props.preIcon || _ctx.$slots.preIcon ? common_vendor.e({
        b: __props.preIcon
      }, __props.preIcon ? {
        c: common_vendor.p({
          name: __props.preIcon,
          size: __props.iconSize,
          color: __props.iconColor
        })
      } : {}) : {}, {
        d: common_vendor.t(__props.text),
        e: __props.suffixIcon || _ctx.$slots.suffixIcon
      }, __props.suffixIcon || _ctx.$slots.suffixIcon ? common_vendor.e({
        f: __props.suffixIcon
      }, __props.suffixIcon ? {
        g: common_vendor.p({
          name: __props.suffixIcon,
          size: __props.iconSize,
          color: __props.iconColor
        })
      } : {}) : {}, {
        h: common_vendor.s(buttonStyle.value),
        i: common_vendor.o(handleClick),
        j: __props.disabled,
        k: common_vendor.gei(_ctx, "")
      });
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-817d40fa"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/SsSearchButton/index.js.map
