'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var context = require('../context.cjs');

function Checkbox({
  prefixCls,
  checked,
  halfChecked,
  disabled,
  onClick
}) {
  const {
    customSlots,
    checkable
  } = context.useInjectCascader();
  const mergedCheckable = checkable.value !== false ? customSlots.value.checkable : checkable.value;
  const customCheckbox = typeof mergedCheckable === "function" ? mergedCheckable() : typeof mergedCheckable === "boolean" ? null : mergedCheckable;
  return vue.createVNode("span", {
    "class": {
      [prefixCls]: true,
      [`${prefixCls}-checked`]: checked,
      [`${prefixCls}-indeterminate`]: !checked && halfChecked,
      [`${prefixCls}-disabled`]: disabled
    },
    "onClick": onClick
  }, [customCheckbox]);
}
Checkbox.props = ["prefixCls", "checked", "halfChecked", "disabled", "onClick"];
Checkbox.displayName = "Checkbox";
Checkbox.inheritAttrs = false;

exports.default = Checkbox;
//# sourceMappingURL=Checkbox.cjs.map
