var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
  BlockCheckbox: () => BlockCheckbox
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_icons_vue = require("@ant-design/icons-vue");
var import_pro_utils = require("@antdv/pro-utils");
var import_ant_design_vue = require("ant-design-vue");
var import_vue2 = require("vue");
const blockCheckboxProps = {
  value: (0, import_pro_utils.stringType)().def(""),
  onChange: (0, import_pro_utils.funcType)().isRequired,
  list: (0, import_pro_utils.arrayType)(),
  configType: (0, import_pro_utils.stringType)().isRequired,
  prefixCls: (0, import_pro_utils.stringType)().isRequired,
  hashId: (0, import_pro_utils.stringType)().isRequired
};
const BlockCheckbox = (0, import_vue2.defineComponent)({
  name: "BlockCheckbox",
  props: blockCheckboxProps,
  setup(props) {
    return () => {
      const {
        value,
        configType,
        onChange,
        list,
        prefixCls,
        hashId
      } = props;
      const baseClassName = `${prefixCls}-block-checkbox`;
      return (0, import_vue.createVNode)("div", {
        "class": (0, import_pro_utils.classNames)(baseClassName, hashId)
      }, [(list || []).map((item) => (0, import_vue.createVNode)(import_ant_design_vue.Tooltip, {
        "title": item.title,
        "key": item.key
      }, {
        default: () => [(0, import_vue.createVNode)("div", {
          "class": (0, import_pro_utils.classNames)(hashId, `${baseClassName}-item`, `${baseClassName}-item-${item.key}`, `${baseClassName}-${configType}-item`),
          "onClick": () => onChange(item.key)
        }, [(0, import_vue.createVNode)(import_icons_vue.CheckOutlined, {
          "class": `${baseClassName}-selectIcon ${hashId}`.trim(),
          "style": {
            display: value === item.key ? "block" : "none"
          }
        }, null), (item == null ? void 0 : item.icon) ? (0, import_vue.createVNode)("div", {
          "class": `${baseClassName}-icon ${hashId}`.trim()
        }, [item.icon]) : null])]
      }))]);
    };
  }
});
