'use strict';

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

var vue = require('vue');
require('../../../utils/index.js');
var checkbox = require('./checkbox.js');
var createNamespace = require('../../../utils/create-namespace.js');

"use strict";
const _hoisted_1 = { key: 0 };
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlCheckbox" },
  __name: "checkbox",
  props: checkbox.checkboxProps,
  setup(__props, { expose: __expose }) {
    const attrs = vue.useAttrs();
    const bem = createNamespace.createNamespace("checkbox");
    const checkboxRef = vue.ref();
    const blur = () => {
      checkboxRef.value.blur();
    };
    const focus = () => {
      checkboxRef.value.focus();
    };
    __expose({
      blur,
      focus
    });
    return (_ctx, _cache) => {
      const _component_a_checkbox = vue.resolveComponent("a-checkbox");
      return vue.openBlock(), vue.createBlock(_component_a_checkbox, vue.mergeProps({
        ref_key: "checkboxRef",
        ref: checkboxRef
      }, vue.unref(attrs), {
        class: vue.unref(bem).b()
      }), vue.createSlots({
        default: vue.withCtx(() => [
          _ctx.checkboxLabel ? (vue.openBlock(), vue.createElementBlock(
            "span",
            _hoisted_1,
            vue.toDisplayString(_ctx.checkboxLabel),
            1
            /* TEXT */
          )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
        ]),
        _: 2
        /* DYNAMIC */
      }, [
        vue.renderList(Object.keys(_ctx.$slots).filter((k) => k !== "default"), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        })
      ]), 1040, ["class"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=checkbox.vue2.js.map
