import React from "react";
import { AccordionTab } from "../accordion/AccordionTab";
import { AccordionWrap } from "../accordion/AccordionWrap";
export const Input = ({ placeholder, type, label, name, labelStyle, setValue, value, tipContent, onKeyDown = () => { }, }) => {
    return (React.createElement(React.Fragment, null, labelStyle == "float"
        ? (React.createElement("div", { className: "form-control float-form-style" },
            React.createElement("input", { type: type, name: name, id: name, value: value, placeholder: placeholder, onChange: (e) => setValue(e.target.value), onKeyDown: onKeyDown }),
            label
                ? (React.createElement("label", { htmlFor: name },
                    label,
                    tipContent
                        ? (React.createElement(AccordionWrap, null,
                            React.createElement(AccordionTab, { accordionStyle: "plain", label: "?", className: "keyword-accordion" }, tipContent)))
                        : null))
                : null))
        : labelStyle == "inline"
            ? (React.createElement("div", { className: "form-control inline" },
                label
                    ? (React.createElement("label", { htmlFor: name },
                        label,
                        tipContent
                            ? (React.createElement(AccordionWrap, null,
                                React.createElement(AccordionTab, { accordionStyle: "plain", label: "?", className: "keyword-accordion" }, tipContent)))
                            : null))
                    : null,
                React.createElement("input", { value: value, type: type, name: name, id: name, placeholder: placeholder, onChange: (e) => setValue(e.target.value), onKeyDown: onKeyDown })))
            : (React.createElement("div", { className: "form-control " },
                label
                    ? (React.createElement("label", { htmlFor: name },
                        label,
                        tipContent
                            ? (React.createElement(AccordionWrap, null,
                                React.createElement(AccordionTab, { accordionStyle: "plain", label: "?", className: "keyword-accordion" }, tipContent)))
                            : null))
                    : null,
                React.createElement("input", { value: value, type: type, name: name, id: name, placeholder: placeholder, onChange: (e) => setValue(e.target.value), onKeyDown: onKeyDown })))));
};
