import "@emotion/react";
import { useRef } from "react";
import { jsx } from "@emotion/react/jsx-runtime";
import { InputBox } from "./styled.js";
const Textarea = ({
  height = 500,
  width = 500,
  center = false,
  fontSize = 24,
  placeholder,
  content,
  value,
  readOnly = false,
  cssStyle,
  className,
  style,
  onChange,
  onKeyDown,
  onBlur,
  onClick
}) => {
  const _content = useRef("");
  const handleChange = (e) => {
    _content.current = e.currentTarget.value;
    if (content) {
      content.current = e.currentTarget.value;
    }
  };
  return /* @__PURE__ */ jsx(
    InputBox,
    {
      width,
      height,
      center,
      fontSize,
      placeholder,
      value,
      readOnly,
      css: cssStyle,
      className,
      style,
      onInput: handleChange,
      onChange,
      onBlur,
      onClick,
      onKeyDown,
      autoFocus: true
    }
  );
};
export {
  Textarea
};
//# sourceMappingURL=index.js.map
