"use strict";
const common_vendor = require("../../../common/vendor.js");
const sheep_hooks_useGoods = require("../../hooks/useGoods.js");
const sheep_index = require("../../index.js");
require("../../url/index.js");
require("../../store/index.js");
require("../../store/app.js");
require("../../api/promotion/diy.js");
require("../../request/index.js");
require("../../config/index.js");
require("../../platform/index.js");
require("../../platform/provider/wechat/index.js");
require("../../platform/provider/wechat/miniProgram.js");
require("../../api/member/auth.js");
require("../../api/member/social.js");
require("../../api/member/user.js");
require("../../platform/provider/apple/index.js");
require("../../platform/share.js");
require("../../router/index.js");
require("../../hooks/useModal.js");
require("../../helper/index.js");
require("../../helper/test.js");
require("../../helper/digit.js");
require("../../api/member/signin.js");
require("../../helper/throttle.js");
require("../../platform/pay.js");
require("../../api/pay/order.js");
require("../../store/user.js");
require("../../store/cart.js");
require("../../api/trade/cart.js");
require("../../api/pay/wallet.js");
require("../../api/trade/order.js");
require("../../api/promotion/coupon.js");
require("../../store/sys.js");
require("../../store/modal.js");
require("../../util/index.js");
require("../../api/index.js");
require("../../api/distri/score.js");
require("../../api/distri/share.js");
require("../../api/distri/team.js");
require("../../api/infra/file.js");
require("../../api/member/address.js");
require("../../api/member/point.js");
require("../../api/migration/app.js");
require("../../api/migration/chat.js");
require("../../api/migration/index.js");
require("../../api/migration/third.js");
require("../../api/pay/channel.js");
require("../../api/product/category.js");
require("../../api/product/comment.js");
require("../../api/product/favorite.js");
require("../../api/product/history.js");
require("../../api/product/spu.js");
require("../../api/promotion/activity.js");
require("../../api/promotion/article.js");
require("../../api/promotion/bargain.js");
require("../../api/promotion/combination.js");
require("../../api/promotion/rewardActivity.js");
require("../../api/promotion/seckill.js");
require("../../api/system/area.js");
require("../../api/system/voice.js");
require("../../api/trade/afterSale.js");
require("../../api/trade/brokerage.js");
require("../../api/trade/config.js");
require("../../api/trade/delivery.js");
require("../../config/zIndex.js");
const _sfc_main = {
  __name: "s-coupon-list",
  props: {
    data: {
      type: Object,
      default: {}
    },
    disabled: {
      type: Boolean,
      default: false
    },
    type: {
      type: String,
      default: "coupon"
      // coupon 优惠劵模版；user 用户优惠劵
    }
  },
  setup(__props) {
    common_vendor.reactive({});
    const isDisable = common_vendor.computed(() => {
      if (props.type === "coupon") {
        return false;
      }
      return props.data.status !== 1;
    });
    const props = __props;
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.t(__props.data.discountType === 1 ? "满减券" : "折扣券"),
        b: common_vendor.n(isDisable.value ? "disabled-bg-color" : "info-bg-color"),
        c: common_vendor.t(__props.data.name),
        d: common_vendor.n(isDisable.value ? "disabled-color" : "info-color"),
        e: __props.data.discountType === 1
      }, __props.data.discountType === 1 ? {} : {}, {
        f: common_vendor.t(__props.data.discountType === 1 ? common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(__props.data.discountPrice) : __props.data.discountPercent / 10),
        g: __props.data.discountType === 2
      }, __props.data.discountType === 2 ? {} : {}, {
        h: common_vendor.n(isDisable.value ? "disabled-color" : "price-text"),
        i: __props.data.validityType === 2
      }, __props.data.validityType === 2 ? {
        j: common_vendor.t(__props.data.fixedEndTerm),
        k: common_vendor.n(isDisable.value ? "disabled-color" : "subtitle-color")
      } : {
        l: common_vendor.t(common_vendor.unref(sheep_index.sheep).$helper.timeFormat(__props.data.validStartTime, "yyyy-mm-dd")),
        m: common_vendor.t(common_vendor.unref(sheep_index.sheep).$helper.timeFormat(__props.data.validEndTime, "yyyy-mm-dd")),
        n: common_vendor.n(isDisable.value ? "disabled-color" : "subtitle-color")
      }, {
        o: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(__props.data.usePrice)),
        p: common_vendor.n(isDisable.value ? "disabled-color" : "subtitle-color"),
        q: common_vendor.t(__props.data.description),
        r: __props.disabled ? "0.5" : "1"
      });
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-81b7b3dc"], ["__file", "D:/zx/mall-front-app/sheep/components/s-coupon-list/s-coupon-list.vue"]]);
wx.createComponent(Component);
