"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _primitives = require("../../primitives");

var _composites = require("../../composites");

var _theme = require("../../../theme");

var _reactNative = require("react-native");

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

const NBStepper = ({
  children,
  ...props
}) => {
  const {
    style,
    isIncrement,
    disablitityCheck,
    _active,
    _disabled,
    isDisabled,
    ariaLabel,
    pressHandler,
    ...newProps
  } = (0, _theme.usePropsConfig)('NumberInputStepper', props);
  return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
    activeOpacity: 1,
    disabled: disablitityCheck || isDisabled,
    onPress: pressHandler,
    accessible: true,
    accessibilityLabel: ariaLabel
  }, /*#__PURE__*/_react.default.createElement(_primitives.Box, _extends({}, newProps, _active, disablitityCheck || isDisabled ? _disabled : {}, {
    style: style
  }), children || isIncrement ? /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
    name: "arrow-drop-up",
    type: "MaterialIcons"
  }) : /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
    name: "arrow-drop-up",
    type: "MaterialIcons"
  })));
};

exports.NBStepper = NBStepper;

const NumberInputStepper = ({
  children,
  ...props
}) => {
  return /*#__PURE__*/_react.default.createElement(_primitives.VStack, _extends({
    divider: /*#__PURE__*/_react.default.createElement(_composites.Divider, null)
  }, props), children);
};

var _default = NumberInputStepper;
exports.default = _default;
//# sourceMappingURL=NumberInputStepper.js.map