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 { timeRangeProps } from './time-range.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

"use strict";
const _hoisted_1 = { key: 1 };
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{ name: "LlTimeRange" },
  __name: "time-range",
  props: timeRangeProps,
  setup(__props) {
    const attrs = useAttrs();
    const bem = createNamespace("time-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_time_range_picker = resolveComponent("a-time-range-picker");
      return openBlock(), createBlock(_component_a_time_range_picker, mergeProps(unref(attrs), {
        placeholder: integratePlaceholder.value,
        class: [unref(bem).b(), unref(bem).is(_ctx.isGray ? "gray-time-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=time-range.vue2.mjs.map
