"use strict";

require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.Doc = void 0;
var _ = require(".");
var _jsxRuntime = require("react/jsx-runtime");
var meta = {
  title: 'Components/MessageTextArea',
  tags: ['autodocs'],
  component: _.MessageTextArea,
  args: {
    limitation: 500,
    placeholder: 'please input',
    styles: {
      display: 'flex'
    }
  },
  argTypes: {}
};
var Doc = exports.Doc = function Doc(props) {
  var limitation = props.limitation,
    placeholder = props.placeholder,
    styles = props.styles;
  var handleMsg = function handleMsg(msg) {
    alert('send msg: ' + msg);
  };
  var handleError = function handleError() {
    alert('message is too long');
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      style: {
        width: 200,
        marginBottom: 50
      },
      children: ["Basic:", /*#__PURE__*/(0, _jsxRuntime.jsx)(_.MessageTextArea, {
        onMsg: function onMsg(msg) {
          alert('send msg: ' + msg);
        },
        onEmoji: function onEmoji(emoji) {
          console.log({
            emoji: emoji
          }, '获取到表情');
        }
      })]
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      children: ["Please Change Properties:", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "Change placeholder to 'please input':", /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        style: {
          width: 200,
          marginBottom: 50
        },
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.MessageTextArea, {
          placeholder: placeholder,
          onMsg: handleMsg
        })
      }), "Change limitation to 500:", /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        style: {
          width: 200,
          marginBottom: 50
        },
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.MessageTextArea, {
          limitation: limitation,
          onMsg: handleMsg
        })
      })]
    })]
  });
};
var _default = exports["default"] = meta;