"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const TUIKit_utils_documentLink = require("../../../../utils/documentLink.js");
const common_assets = require("../../../../../common/assets.js");
const TUIKit_components_TUIGroup_createGroup_groupIntroduction_config = require("./config.js");
const TUIKit_utils_env = require("../../../../utils/env.js");
if (!Math) {
  Icon();
}
const Icon = () => "../../../common/Icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  props: {
    groupType: {
      type: String,
      default: ""
    }
  },
  emits: ["selectType"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const type = TUIKit_components_TUIGroup_createGroup_groupIntroduction_config.groupIntroConfig;
    const selectType = common_vendor.ref();
    const emit = __emit;
    common_vendor.watchEffect(() => {
      selectType.value = props.groupType;
    });
    const selected = (item) => {
      selectType.value = item.type;
      emit("selectType", item.type);
    };
    const openUrl = (link) => {
      var _a;
      if (!TUIKit_utils_env.isUniFrameWork) {
        (_a = common_vendor.i) == null ? void 0 : _a.open(link);
      }
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(common_vendor.unref(type), (item, index, i0) => {
          return common_vendor.e({
            a: "ec1da4f5-0-" + i0,
            b: common_vendor.p({
              file: item.icon
            }),
            c: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUIGroup.${item.label}`)),
            d: common_vendor.unref(selectType) === item.type
          }, common_vendor.unref(selectType) === item.type ? {
            e: "ec1da4f5-1-" + i0,
            f: common_vendor.p({
              file: common_vendor.unref(common_assets.selectedIcon)
            })
          } : {}, {
            g: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUIGroup.${item.detail}`)),
            h: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUIGroup.${item.src}`)),
            i: common_vendor.o$1(($event) => openUrl(common_vendor.unref(TUIKit_utils_documentLink.Link).product.url), index),
            j: index,
            k: common_vendor.n(common_vendor.unref(selectType) === item.type && "selected"),
            l: common_vendor.o$1(($event) => selected(item), index)
          });
        }),
        b: common_vendor.unref(TUIKit_utils_documentLink.Link).product.url
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ec1da4f5"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIGroup/create-group/group-introduction/index.js.map
