import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import React from 'react';
import { FxInput } from "../../../components/FxInput";
export var FxInputPlayground = /*#__PURE__*/function (_React$Component) {
  function FxInputPlayground() {
    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 = {
      auto: true,
      value: 'auto'
    };
    _this.onValueChange = function (value) {
      _this.setState({
        value: value,
        auto: false
      });
    };
    _this.handleRestore = function () {
      _this.setState({
        value: 'auto',
        auto: true
      });
    };
    return _this;
  }
  _inheritsLoose(FxInputPlayground, _React$Component);
  var _proto = FxInputPlayground.prototype;
  _proto.render = function render() {
    return /*#__PURE__*/React.createElement(FxInput, {
      auto: this.state.auto,
      type: 'text',
      value: this.state.value,
      onRestore: this.handleRestore,
      onValueChange: this.onValueChange,
      width: 150
    });
  };
  return FxInputPlayground;
}(React.Component);