"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.textareaControlledPropTypes = exports.textareaControlledDescription = exports.propsDescription = exports.defaultProps = exports["default"] = void 0;

var _propTypes = _interopRequireDefault(require("prop-types"));

var _Textarea = _interopRequireDefault(require("./Textarea.ariaPropTypes"));

var _htmlAttributes = _interopRequireWildcard(require("../../propTypes/htmlAttributes.propTypes"));

var _customClassName = _interopRequireWildcard(require("../../propTypes/customClassName.propTypes"));

var _automation = _interopRequireWildcard(require("../../propTypes/automation.propTypes"));

var _Textarea2 = _interopRequireDefault(require("./Textarea.customIds"));

var _Textarea3 = _interopRequireDefault(require("./Textarea.constantProps"));

var _defaultProps;

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

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

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var textAreaPropTypes = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
  id: _propTypes["default"].string,
  name: _propTypes["default"].string,
  placeholder: _propTypes["default"].string,
  value: _propTypes["default"].string,
  required: _propTypes["default"].bool,
  readOnly: _propTypes["default"].bool,
  rows: _propTypes["default"].number,
  cols: _propTypes["default"].number,
  resize: _propTypes["default"].oneOf([_Textarea3["default"].resize.none, _Textarea3["default"].resize.horizontal, _Textarea3["default"].resize.vertical, _Textarea3["default"].resize.both]),
  autoFocus: _propTypes["default"].bool,
  disabled: _propTypes["default"].bool,
  hovered: _propTypes["default"].bool,
  minLength: _propTypes["default"].number,
  maxLength: _propTypes["default"].number,
  color: _propTypes["default"].oneOf([_Textarea3["default"].color["default"], _Textarea3["default"].color.primary, _Textarea3["default"].color.danger]),
  variant: _propTypes["default"].oneOf([_Textarea3["default"].variant.outline, _Textarea3["default"].variant.flushed, _Textarea3["default"].variant.filled, _Textarea3["default"].variant.plain]),
  size: _propTypes["default"].oneOf([_Textarea3["default"].size.small, _Textarea3["default"].size.medium, _Textarea3["default"].size.large]),
  animateOnFocus: _propTypes["default"].bool,
  onBlur: _propTypes["default"].func,
  onChange: _propTypes["default"].func,
  onClick: _propTypes["default"].func,
  onFocus: _propTypes["default"].func,
  onKeyDown: _propTypes["default"].func,
  onKeyUp: _propTypes["default"].func,
  onkeypress: _propTypes["default"].func,
  getRef: _propTypes["default"].func
}, _Textarea["default"]), _customClassName["default"]), _automation["default"]), _htmlAttributes["default"]);

var _default = textAreaPropTypes;
exports["default"] = _default;
var defaultProps = (_defaultProps = {
  required: false,
  readOnly: false,
  resize: _Textarea3["default"].resize.both,
  autoFocus: false,
  disabled: false,
  animateOnFocus: _propTypes["default"]["false"]
}, _defineProperty(_defaultProps, _automation.automationPropsName, _Textarea2["default"]), _defineProperty(_defaultProps, _customClassName.customClassPropName, {}), _defineProperty(_defaultProps, _htmlAttributes.tagAttributePropsName, {}), _defaultProps);
exports.defaultProps = defaultProps;
var propsDescription = {
  id: 'An id attribute to allow the <Textarea> component for accessibility purposes.',
  name: 'The name of the control.',
  placeholder: 'A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.',
  value: 'Specifies the text area input value. (controlled)',
  required: 'Specifies that a text area is required/must be filled out. If true, the textarea control will be required. This has 2 side effects: - The Textarea will show a required indicator - The form element (e.g, Input) will have `aria-required` set to true.',
  readOnly: 'Specifies that a text area should be read-only. If true, the text area control will be readonly.',
  rows: 'The number of visible text lines for the control.',
  cols: 'The visible width of the text control, in average character widths. If it is specified, it must be a positive integer.',
  defaultValue: 'Use state value in uncontrolled textarea component',
  resize: 'Specifies the resize both the height and width of the element.',
  autoFocus: 'Specifies that a text area should automatically get focus when the page loads.',
  disabled: 'Specifies the text area should be disabled. If true, the form control will be disabled.',
  minLength: 'The minimum number of characters (UTF-16 code units) required that the user should enter.',
  maxLength: "The maximum number of characters (UTF-16 code units) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters.",
  variant: 'Specifies the variant type of text area like ["outline" | "flushed" | "filled" | "plain" ]',
  animateOnFocus: 'Specifies the visible text height increased in focused time. if true the text height increased',
  color: 'Specifies the variant color of text area like ["default" | "primary", "danger"]',
  size: 'Specifies the visible text height like [small | medium | Large | xLarge]',
  onBlur: 'Event occurs when an object loses focus.',
  onChange: 'Event occurs when the value of an element has been changed.',
  onClick: 'Event occurs when the user clicks on an element.',
  onFocus: 'Event occurs when an element gets focus.',
  onKeyDown: 'Event occurs when the user is pressing a key (on the keyboard).',
  onKeyUp: 'Event occurs when the user releases a key (on the keyboard).',
  onkeypress: 'Event occurs when the user presses a key (on the keyboard).',
  role: 'The role is used to communicate an important and usually time-sensitive message to the user',
  tabIndex: 'Specifies the keyboard tab order of the textarea relative to the other controls on the page.The tabIndex value indicates when the textarea can be focused.',
  ariaLabel: 'Defines a string value that labels an interactive element',
  ariaLabelledby: 'Enables authors to reference other elements on the page to define an accessible name.',
  ariaPlaceholder: 'Represents a hint (word or phrase) to the user about what to enter into the text field',
  ariaRequired: 'Indicates that a value must be provided for the field before it is submitted.',
  ariaReadonly: 'Indicates that the user cannot modify the value of the text field.',
  ariaDisabled: 'Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.'
};
exports.propsDescription = propsDescription;

var textareaControlledPropTypes = _objectSpread({
  defaultValue: _propTypes["default"].string
}, textAreaPropTypes);

exports.textareaControlledPropTypes = textareaControlledPropTypes;

var textareaControlledDescription = _objectSpread({
  defaultValue: 'The default value (uncontrolled).'
}, propsDescription);

exports.textareaControlledDescription = textareaControlledDescription;