import _extends from "@babel/runtime/helpers/esm/extends";
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import React from 'react';
import { CurrencyInput } from "../../../components/CurrencyInput";
export var CurrencyInputPlayground = /*#__PURE__*/function (_React$Component) {
  function CurrencyInputPlayground() {
    var _this;
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
    _this.state = {
      value: _this.props.value || 2222
    };
    _this.handleChange = function (value) {
      _this.setState({
        value: value
      });
    };
    return _this;
  }
  _inheritsLoose(CurrencyInputPlayground, _React$Component);
  var _proto = CurrencyInputPlayground.prototype;
  _proto.render = function render() {
    return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CurrencyInput, _extends({}, this.props, {
      placeholder: 'currency',
      value: this.state.value,
      onValueChange: this.handleChange,
      width: 150
    })));
  };
  return CurrencyInputPlayground;
}(React.Component);