'use strict';

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

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

"use strict";
const _hoisted_1 = { key: 1 };
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlDateRange" },
  __name: "date-range",
  props: dateRange.dateRangeProps,
  setup(__props) {
    const attrs = vue.useAttrs();
    const bem = createNamespace.createNamespace("date-range");
    const props = __props;
    const integratePlaceholder = vue.computed(() => {
      return [
        props.startPlaceholder || props.placeholder?.[0],
        props.endPlaceholder || props.placeholder?.[1]
      ];
    });
    return (_ctx, _cache) => {
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_range_picker = vue.resolveComponent("a-range-picker");
      return vue.openBlock(), vue.createBlock(_component_a_range_picker, vue.mergeProps(vue.unref(attrs), {
        placeholder: integratePlaceholder.value,
        class: [vue.unref(bem).b(), vue.unref(bem).is(_ctx.isGray ? "gray-date-range" : "")]
      }), vue.createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        vue.renderList(Object.keys(_ctx.$slots).filter((slot) => slot !== "separator"), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        }),
        _ctx.$slots.separator || _ctx.separatorIcon || _ctx.separatorText ? {
          name: "separator",
          fn: vue.withCtx(() => [
            _ctx.$slots.separator ? vue.renderSlot(_ctx.$slots, "separator", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(
              vue.Fragment,
              { key: 1 },
              [
                _ctx.separatorIcon ? (vue.openBlock(), vue.createBlock(_component_ll_icon, {
                  key: 0,
                  "icon-name": _ctx.separatorIcon
                }, null, 8, ["icon-name"])) : (vue.openBlock(), vue.createElementBlock(
                  "span",
                  _hoisted_1,
                  vue.toDisplayString(_ctx.separatorText),
                  1
                  /* TEXT */
                ))
              ],
              64
              /* STABLE_FRAGMENT */
            ))
          ]),
          key: "0"
        } : void 0
      ]), 1040, ["placeholder", "class"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=date-range.vue2.js.map
