import { getText } from "../../../locales/index.js";
import IconFont from "../../iconfont/index.js";
import Button from "../../button/index.js";
import PisellInput from "../../pisellInput/index.js";
import React, { useState } from "react";
import "./index.less";
//#region src/components/pisellInformationEntry/Input/index.tsx
const PisellEntryInput = (props) => {
	const { onChange, searchDescribe } = props;
	const [value, setValue] = useState("");
	return /* @__PURE__ */ React.createElement("div", { className: "pisell-entry-input-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "pisell-entry-input-line" }, /* @__PURE__ */ React.createElement(PisellInput, {
		autoFocus: true,
		value,
		onChange: (e) => {
			setValue(e.target.value);
			if (!e.target.value) onChange(e.target.value);
		},
		onPressEnter: (e) => {
			onChange(value);
		},
		style: { flex: 1 },
		prefix: /* @__PURE__ */ React.createElement(IconFont, {
			style: { color: "#667085" },
			type: "pisell2-search-lg"
		}),
		allowClear: true
	}), /* @__PURE__ */ React.createElement(Button, {
		size: "large",
		onClick: () => onChange(value),
		disabled: !value
	}, getText("pisell-information-entry-input-search"))), /* @__PURE__ */ React.createElement("div", { className: "pisell-entry-input-describe" }, searchDescribe));
};
//#endregion
export { PisellEntryInput as default };
