"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "SearchForm", {
    enumerable: true,
    get: function() {
        return SearchForm;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _input = require("../../../input");
const _inputMask = require("../../../input/inputMask");
const _lucidereact = require("lucide-react");
const _react = require("react");
const SearchForm = (props)=>{
    // const [key, setKey] = useState<string>("");
    const onClean = (0, _react.useCallback)(()=>{
        //
        props.onChange?.("");
    }, []);
    // useEffect(() => {
    //   props.onChange?.(key);
    // }, [key]);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_input.Input, {
        fullWidth: true,
        placeholder: "Search instrument",
        onClean: onClean,
        value: props.value,
        containerClassName: "orderly-markets-search orderly-bg-base-900",
        className: "orderly-markets-search-input orderly-text-2xs",
        onChange: (event)=>{
            props.onChange?.(event.target.value);
        },
        prefix: /*#__PURE__*/ (0, _jsxruntime.jsx)(_inputMask.InputMask, {
            children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_lucidereact.Search, {
                size: 16,
                className: "orderly-markets-search-icon orderly-text-base-contrast-20"
            })
        })
    });
};

//# sourceMappingURL=search.js.map