import { isEmpty } from 'fp-ts/lib/Array';
import { h } from 'vue';
export default function BList(props, {
  slots
}) {
  if (isEmpty(props.items)) {
    return h(props.tag ?? 'div', slots.empty && slots.empty());
  } else {
    const length = props.items.length;
    const slot = slots.default;
    return slot && h(props.tag ?? 'div', props.items.map((item, index) => slot({
      item,
      index,
      length,
      isLast: index === length - 1
    })));
  }
}
//# sourceMappingURL=BList.js.map