function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useState } from 'react';
import PisellNumberSelector from "./index";
var Example = function Example() {
  var _useState = useState(1),
    _useState2 = _slicedToArray(_useState, 2),
    value1 = _useState2[0],
    setValue1 = _useState2[1];
  var _useState3 = useState(50),
    _useState4 = _slicedToArray(_useState3, 2),
    value2 = _useState4[0],
    setValue2 = _useState4[1];
  var _useState5 = useState(99),
    _useState6 = _slicedToArray(_useState5, 2),
    value3 = _useState6[0],
    setValue3 = _useState6[1];
  return /*#__PURE__*/React.createElement("div", {
    style: {
      padding: '20px',
      display: 'flex',
      flexDirection: 'column',
      gap: '20px'
    }
  }, /*#__PURE__*/React.createElement("h3", null, "PisellNumberSelector \u4F7F\u7528\u793A\u4F8B"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u57FA\u7840\u7528\u6CD5"), /*#__PURE__*/React.createElement(PisellNumberSelector, {
    value: value1,
    onChange: setValue1,
    min: 0,
    max: 10,
    size: "middle"
  }), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C: ", value1)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u4E0D\u540C\u5C3A\u5BF8"), /*#__PURE__*/React.createElement("div", {
    style: {
      display: 'flex',
      gap: '10px',
      alignItems: 'center'
    }
  }, /*#__PURE__*/React.createElement(PisellNumberSelector, {
    value: value2,
    onChange: setValue2,
    size: "small"
  }), /*#__PURE__*/React.createElement(PisellNumberSelector, {
    value: value2,
    onChange: setValue2,
    size: "middle"
  }), /*#__PURE__*/React.createElement(PisellNumberSelector, {
    value: value2,
    onChange: setValue2,
    size: "large"
  }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u542F\u7528\u4EF7\u683C\u8C03\u6574\u529F\u80FD"), /*#__PURE__*/React.createElement(PisellNumberSelector, {
    value: value3,
    onChange: setValue3,
    min: 0,
    max: 999,
    size: "large",
    enablePriceAdjust: true,
    originValue: 100
  }), /*#__PURE__*/React.createElement("p", null, "\u70B9\u51FB\u6570\u5B57\u53EF\u4EE5\u6253\u5F00\u4EF7\u683C\u8C03\u6574\u9762\u677F"), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C: ", value3)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u7981\u7528\u72B6\u6001"), /*#__PURE__*/React.createElement(PisellNumberSelector, {
    value: 50,
    onChange: function onChange() {},
    disabled: true,
    size: "middle"
  })));
};
export default Example;