'use strict';

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

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

"use strict";
const _hoisted_1 = { key: 1 };
const _hoisted_2 = { key: 1 };
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlSwitch" },
  __name: "switch",
  props: _switch.switchProps,
  setup(__props) {
    const bem = createNamespace.createNamespace("switch");
    const attrs = vue.useAttrs();
    return (_ctx, _cache) => {
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_switch = vue.resolveComponent("a-switch");
      return vue.openBlock(), vue.createBlock(_component_a_switch, vue.mergeProps(vue.unref(attrs), {
        class: vue.unref(bem).b()
      }), vue.createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        vue.renderList(Object.keys(_ctx.$slots).filter(
          (k) => k !== "checkedChildren" && k !== "unCheckedChildren"
        ), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        }),
        _ctx.$slots.checkedChildren || _ctx.checkedIcon || _ctx.checkedLabel ? {
          name: "checkedChildren",
          fn: vue.withCtx(() => [
            _ctx.$slots.checkedChildren ? vue.renderSlot(_ctx.$slots, "checkedChildren", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(
              vue.Fragment,
              { key: 1 },
              [
                _ctx.checkedIcon ? (vue.openBlock(), vue.createBlock(_component_ll_icon, {
                  key: 0,
                  "icon-name": _ctx.checkedIcon
                }, null, 8, ["icon-name"])) : (vue.openBlock(), vue.createElementBlock(
                  "span",
                  _hoisted_1,
                  vue.toDisplayString(_ctx.checkedLabel),
                  1
                  /* TEXT */
                ))
              ],
              64
              /* STABLE_FRAGMENT */
            ))
          ]),
          key: "0"
        } : void 0,
        _ctx.$slots.unCheckedChildren || _ctx.unCheckedIcon || _ctx.unCheckedLabel ? {
          name: "unCheckedChildren",
          fn: vue.withCtx(() => [
            _ctx.$slots.unCheckedChildren ? vue.renderSlot(_ctx.$slots, "unCheckedChildren", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(
              vue.Fragment,
              { key: 1 },
              [
                _ctx.unCheckedIcon ? (vue.openBlock(), vue.createBlock(_component_ll_icon, {
                  key: 0,
                  "icon-name": _ctx.unCheckedIcon
                }, null, 8, ["icon-name"])) : (vue.openBlock(), vue.createElementBlock(
                  "span",
                  _hoisted_2,
                  vue.toDisplayString(_ctx.unCheckedLabel),
                  1
                  /* TEXT */
                ))
              ],
              64
              /* STABLE_FRAGMENT */
            ))
          ]),
          key: "1"
        } : void 0
      ]), 1040, ["class"]);
    };
  }
});

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