import PropTypes from '../_util/vue-types';
import { getSlot } from '../_util/props-util';

export default {
  name: 'LazyRenderBox',
  props: {
    visible: PropTypes.bool,
    hiddenClassName: PropTypes.string,
  },
  render() {
    const { hiddenClassName } = this.$props;
    const child = getSlot(this);
    if (hiddenClassName || (child && child.length > 1)) {
      // const cls = '';
      // if (!visible && hiddenClassName) {
      //   // cls += ` ${hiddenClassName}`
      // }
      return <div>{child}</div>;
    }
    return child && child[0];
  },
};
