"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { useId } from "react";
import "./text-area.css";
function TextArea({ label, onChange, rows = 4, placeholder = '', 'data-test-id': dataTestId }) {
    const inputId = useId();
    return /*#__PURE__*/ jsxs("div", {
        className: "TextArea__wrapper",
        children: [
            /*#__PURE__*/ jsx("label", {
                className: "TextArea__label",
                htmlFor: inputId,
                children: label
            }),
            /*#__PURE__*/ jsx("textarea", {
                rows: rows,
                id: inputId,
                className: "TextArea__input",
                placeholder: placeholder,
                onChange: (e)=>{
                    onChange(e.target.value);
                },
                "data-test-id": dataTestId
            })
        ]
    });
}
export { TextArea };
