import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { createVNode as _createVNode, resolveDirective as _resolveDirective } from "vue";
import { defineComponent, ref, computed } from 'vue';
import { Scrollbar as BaseScrollbar } from './BaseScrollbar';
export var scrollbarProps = {
  trigger: String,
  xScrollable: Boolean,
  onScroll: Function
};
var Scrollbar = defineComponent({
  name: 'PfScrollbar',
  props: scrollbarProps,
  setup: function setup() {
    var scrollbarInstRef = ref(null);
    var scrollContainer = computed(function () {
      var _scrollbarInstRef$val;
      return (_scrollbarInstRef$val = scrollbarInstRef.value) === null || _scrollbarInstRef$val === void 0 ? void 0 : _scrollbarInstRef$val.containerRef;
    });
    var exposedMethods = {
      scrollTo: function scrollTo() {
        var _scrollbarInstRef$val2;
        (_scrollbarInstRef$val2 = scrollbarInstRef.value) === null || _scrollbarInstRef$val2 === void 0 ? void 0 : _scrollbarInstRef$val2.scrollTo(arguments.length <= 0 ? undefined : arguments[0], arguments.length <= 1 ? undefined : arguments[1]);
      },
      scrollBy: function scrollBy() {
        var _scrollbarInstRef$val3;
        (_scrollbarInstRef$val3 = scrollbarInstRef.value) === null || _scrollbarInstRef$val3 === void 0 ? void 0 : _scrollbarInstRef$val3.scrollBy(arguments.length <= 0 ? undefined : arguments[0], arguments.length <= 1 ? undefined : arguments[1]);
      }
    };
    return _objectSpread(_objectSpread({}, exposedMethods), {}, {
      scrollbarInstRef: scrollbarInstRef,
      scrollContainer: scrollContainer
    });
  },
  render: function render() {
    return _createVNode(BaseScrollbar, _objectSpread({
      "ref": "scrollbarInstRef"
    }, this.$props), this.$slots);
  }
});
export default Scrollbar;