"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _vue = _interopRequireWildcard(require("vue"));

var _LeftOutlined = _interopRequireDefault(require("@ant-design/icons-vue/LeftOutlined"));

var _RightOutlined = _interopRequireDefault(require("@ant-design/icons-vue/RightOutlined"));

var _button = _interopRequireDefault(require("../button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function noop() {}

var Operation = function Operation(_, _ref) {
  var attrs = _ref.attrs;
  var disabled = attrs.disabled,
      _attrs$moveToLeft = attrs.moveToLeft,
      moveToLeft = _attrs$moveToLeft === void 0 ? noop : _attrs$moveToLeft,
      _attrs$moveToRight = attrs.moveToRight,
      moveToRight = _attrs$moveToRight === void 0 ? noop : _attrs$moveToRight,
      _attrs$leftArrowText = attrs.leftArrowText,
      leftArrowText = _attrs$leftArrowText === void 0 ? '' : _attrs$leftArrowText,
      _attrs$rightArrowText = attrs.rightArrowText,
      rightArrowText = _attrs$rightArrowText === void 0 ? '' : _attrs$rightArrowText,
      leftActive = attrs.leftActive,
      rightActive = attrs.rightActive,
      className = attrs.class,
      style = attrs.style;
  return _vue.createVNode("div", {
    "class": className,
    "style": style
  }, [_vue.createVNode(_button.default, {
    "type": "primary",
    "size": "small",
    "disabled": disabled || !rightActive,
    "onClick": moveToRight,
    "icon": _vue.createVNode(_RightOutlined.default, null, null)
  }, {
    default: function _default() {
      return [rightArrowText];
    }
  }), _vue.createVNode(_button.default, {
    "type": "primary",
    "size": "small",
    "disabled": disabled || !leftActive,
    "onClick": moveToLeft,
    "icon": _vue.createVNode(_LeftOutlined.default, null, null)
  }, {
    default: function _default() {
      return [leftArrowText];
    }
  })]);
};

Operation.inheritAttrs = false;
var _default2 = Operation;
exports.default = _default2;