'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var index = require('../../vc-resize-observer/src/index.cjs');
var _class = require('../../../utils/dom/class.cjs');

const Filter = ({
  height,
  offset,
  prefixCls,
  onInnerResize
}, {
  slots
}) => {
  let outerStyle = {};
  let innerStyle = {
    display: "flex",
    flexDirection: "column"
  };
  if (offset !== void 0) {
    outerStyle = {
      height: `${height}px`,
      position: "relative",
      overflow: "hidden"
    };
    innerStyle = {
      ...innerStyle,
      transform: `translateY(${offset}px)`,
      position: "absolute",
      left: 0,
      right: 0,
      top: 0
    };
  }
  return vue.createVNode("div", {
    "style": outerStyle
  }, [vue.createVNode(index.default, {
    "onResize": ({
      offsetHeight
    }) => {
      if (offsetHeight && onInnerResize)
        onInnerResize();
    }
  }, {
    default: () => {
      var _a;
      return [vue.createVNode("div", {
        "style": innerStyle,
        "class": _class.classNames({
          [`${prefixCls}-holder-inner`]: prefixCls
        })
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])];
    }
  })]);
};
Filter.displayName = "Filter";
Filter.inheritAttrs = false;
Filter.props = {
  prefixCls: String,
  /** Virtual filler height. Should be `count * itemMinHeight` */
  height: Number,
  /** Set offset of visible items. Should be the top of start item position */
  offset: Number,
  onInnerResize: Function
};

exports.default = Filter;
//# sourceMappingURL=Filler.cjs.map
