import { jsx as _jsx } from "react/jsx-runtime";
import clsx from "clsx";
import React, { useState } from "react";
import { Styles } from "./styles";
const Textarea = React.forwardRef(({ unstyled, value, onChange, className, ...others }, ref) => {
    const [currentValue, setCurrentValue] = useState(value || "");
    const _onChange = (ev) => {
        const value = ev.target.value;
        setCurrentValue(value);
        onChange && onChange(value);
    };
    return (_jsx("textarea", { ref: ref, ...others, className: clsx('w-full', unstyled ? Styles.INPUT_UNSTYLED : Styles.INPUT, className), value: currentValue, onChange: _onChange }));
});
export { Textarea };
//# sourceMappingURL=Textarea.js.map