"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { useId } from "react";
import "./input.css";
function TextInput({ label, value, onChange, placeholder = '', 'data-test-id': dataTestId, type = 'text' }) {
    const inputId = useId();
    return /*#__PURE__*/ jsxs("div", {
        className: "Input__wrapper",
        children: [
            /*#__PURE__*/ jsx("label", {
                className: "Input__label",
                htmlFor: inputId,
                children: label
            }),
            /*#__PURE__*/ jsx("input", {
                id: inputId,
                type: type,
                className: "Input__input",
                placeholder: placeholder,
                value: value,
                onChange: (e)=>{
                    onChange(e.target.value);
                },
                "data-test-id": dataTestId
            })
        ]
    });
}
export default TextInput;
