import React__default, { useState } from 'react';
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-f50d7ab0.js';
import 'prop-types';
import '../stringSet-e9bb0333.js';

const InputLabel = _ref => {
  let {
    children
  } = _ref;
  return /*#__PURE__*/React__default.createElement(Label, {
    className: "sendbird-input-label",
    type: LabelTypography.CAPTION_3,
    color: LabelColors.ONBACKGROUND_1
  }, children);
};
const Input = /*#__PURE__*/React__default.forwardRef((props, ref) => {
  const {
    name,
    required,
    disabled,
    value,
    placeHolder
  } = props;
  const [inputValue, setInputValue] = useState(value);
  return /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-input"
  }, /*#__PURE__*/React__default.createElement("input", {
    className: "sendbird-input__input",
    ref: ref,
    name: name,
    required: required,
    disabled: disabled,
    value: inputValue,
    onChange: e => {
      setInputValue(e.target.value);
    }
  }), placeHolder && !inputValue && /*#__PURE__*/React__default.createElement(Label, {
    className: "sendbird-input__placeholder",
    type: LabelTypography.BODY_1,
    color: LabelColors.ONBACKGROUND_3
  }, placeHolder));
});

export { InputLabel, Input as default };
//# sourceMappingURL=Input.js.map
