"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_up_th2 = common_vendor.resolveComponent("up-th");
  const _easycom_up_tr2 = common_vendor.resolveComponent("up-tr");
  const _easycom_up_table2 = common_vendor.resolveComponent("up-table");
  (_easycom_up_th2 + _easycom_up_tr2 + _easycom_up_table2)();
}
const _easycom_up_th = () => "../../node-modules/uview-plus/components/u-th/u-th.js";
const _easycom_up_tr = () => "../../node-modules/uview-plus/components/u-tr/u-tr.js";
const _easycom_up_table = () => "../../node-modules/uview-plus/components/u-table/u-table.js";
if (!Math) {
  (_easycom_up_th + SsInput + Td + _easycom_up_tr + _easycom_up_table)();
}
const SsInput = () => "../SsInput/index.js";
const Td = () => "../Td/index.js";
const _sfc_main = {
  __name: "index",
  props: {
    // 是否显示审核意见
    showShyj: {
      type: Boolean,
      default: false
    },
    // 审核意见标题
    shyjTitle: {
      type: String,
      default: "审核意见"
    },
    // 审核意见占位符
    shyjPlaceholder: {
      type: String,
      default: "请输入审核意见"
    },
    // 按钮配置
    buttons: {
      type: Array,
      default: () => [
        { text: "取消", action: "cancel" },
        { text: "保存并提交", action: "submit" }
      ]
    }
  },
  emits: ["button-click", "update:shyjValue"],
  setup(__props, { emit: __emit }) {
    const reason = common_vendor.ref("");
    const emit = __emit;
    const handleButtonClick = (button, index) => {
      emit("button-click", {
        action: button.action,
        button,
        index,
        shyjValue: reason.value
        // 传递审核意见
      });
    };
    const handleShyjInput = (value) => {
      emit("update:shyjValue", value);
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: __props.showShyj
      }, __props.showShyj ? {
        b: common_vendor.t(__props.shyjTitle),
        c: common_vendor.o(handleShyjInput),
        d: common_vendor.o(($event) => reason.value = $event),
        e: common_vendor.p({
          placeholder: __props.shyjPlaceholder,
          modelValue: reason.value
        })
      } : {}, {
        f: common_vendor.f(__props.buttons, (button, index, i0) => {
          return common_vendor.e({
            a: common_vendor.t(button.text),
            b: common_vendor.o(($event) => handleButtonClick(button, index), index),
            c: index < __props.buttons.length - 1
          }, index < __props.buttons.length - 1 ? {} : {}, {
            d: index
          });
        }),
        g: common_vendor.s(__props.showShyj ? "" : "border-top: 1rpx solid #e6e6e6;"),
        h: common_vendor.gei(_ctx, "")
      });
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b930fedb"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/SsBottom/index.js.map
