import { defineComponent, useAttrs, computed, resolveComponent, createBlock, openBlock, mergeProps, unref, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementBlock, Fragment, toDisplayString } from 'vue';
import '../../../utils/index.mjs';
import { dateRangeProps } from './date-range.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

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

export { _sfc_main as default };
//# sourceMappingURL=date-range.vue2.mjs.map
