"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Input = void 0;
const react_1 = __importDefault(require("react"));
const AccordionTab_1 = require("../accordion/AccordionTab");
const AccordionWrap_1 = require("../accordion/AccordionWrap");
const Input = ({ placeholder, type, label, name, labelStyle, setValue, value, tipContent, onKeyDown = () => { }, }) => {
    return (react_1.default.createElement(react_1.default.Fragment, null, labelStyle == 'float' ? (react_1.default.createElement("div", { className: "form-control float-form-style" },
        react_1.default.createElement("input", { type: type, name: name, id: name, value: value, placeholder: placeholder, onChange: e => setValue(e.target.value), onKeyDown: onKeyDown }),
        label ? (react_1.default.createElement("label", { htmlFor: name },
            label,
            tipContent ? (react_1.default.createElement(AccordionWrap_1.AccordionWrap, null,
                react_1.default.createElement(AccordionTab_1.AccordionTab, { accordionStyle: "plain", label: "?", className: "keyword-accordion" }, tipContent))) : null)) : null)) : labelStyle == 'inline' ? (react_1.default.createElement("div", { className: "form-control inline" },
        label ? (react_1.default.createElement("label", { htmlFor: name },
            label,
            tipContent ? (react_1.default.createElement(AccordionWrap_1.AccordionWrap, null,
                react_1.default.createElement(AccordionTab_1.AccordionTab, { accordionStyle: "plain", label: "?", className: "keyword-accordion" }, tipContent))) : null)) : null,
        react_1.default.createElement("input", { value: value, type: type, name: name, id: name, placeholder: placeholder, onChange: e => setValue(e.target.value), onKeyDown: onKeyDown }))) : (react_1.default.createElement("div", { className: "form-control " },
        label ? (react_1.default.createElement("label", { htmlFor: name },
            label,
            tipContent ? (react_1.default.createElement(AccordionWrap_1.AccordionWrap, null,
                react_1.default.createElement(AccordionTab_1.AccordionTab, { accordionStyle: "plain", label: "?", className: "keyword-accordion" }, tipContent))) : null)) : null,
        react_1.default.createElement("input", { value: value, type: type, name: name, id: name, placeholder: placeholder, onChange: e => setValue(e.target.value), onKeyDown: onKeyDown })))));
};
exports.Input = Input;
