"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _core = require("@emotion/core");

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _react = require("@storybook/react");

var _addonKnobs = require("@storybook/addon-knobs");

var _addonActions = require("@storybook/addon-actions");

var _Root = _interopRequireDefault(require("../../../Root"));

var _hocs = require("../../../../hocs");

var _ = require(".");

var ControlledTextareaRegular = (0, _hocs.withValueState)()(_.TextareaFieldRegular);
(0, _react.storiesOf)('TextareaFieldRegular', module).addDecorator(_addonKnobs.withKnobs).add('Controlled', function () {
  return (0, _core.jsx)(_Root["default"], null, (0, _core.jsx)(ControlledTextareaRegular, {
    id: "awesomeField",
    label: "Name",
    value: "Hello TextareaRegular",
    focused: true
  }));
}).add('Uncontrolled', function () {
  var knobs = {
    label: (0, _addonKnobs.text)('label', 'Awesome label'),
    value: (0, _addonKnobs.text)('value', 'Awesome value'),
    disabled: (0, _addonKnobs["boolean"])('disabled', false),
    hovered: (0, _addonKnobs["boolean"])('hovered', false),
    focused: (0, _addonKnobs["boolean"])('focused', false),
    error: (0, _addonKnobs.text)('error', 'Something went wrong'),
    success: (0, _addonKnobs["boolean"])('success', false),
    hint: (0, _addonKnobs.text)('hint', 'Some hint')
  };
  var actions = {
    onClick: (0, _addonActions.action)('onClick'),
    onFocus: (0, _addonActions.action)('onFocus'),
    onBlur: (0, _addonActions.action)('onBlur')
  };
  return (0, _core.jsx)(_Root["default"], null, (0, _core.jsx)(_.UncontrolledTextareaFieldRegular, (0, _extends2["default"])({}, knobs, actions)));
});