const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/virtual-keyboard/VirtualInput/index.tsx
const VirtualInput = (props) => {
	const { value, autoFocus, placeholder = "" } = props;
	const [isFocus, setIsFocus] = (0, react.useState)(autoFocus);
	const onFocus = () => {
		setIsFocus(true);
	};
	const onBlur = () => {
		setIsFocus(false);
	};
	return /* @__PURE__ */ react.default.createElement("div", {
		onFocus,
		onBlur,
		tabIndex: 0,
		className: (0, classnames.default)("pisell-virtual-input-value", { "pisell-virtual-input-value-focus": isFocus })
	}, value, ((0, _pisell_utils.isUndefined)(value) || value === "") && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-virtual-input-placeholder" }, placeholder), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-virtual-input-caret-container" }, isFocus && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-virtual-input-caret" })));
};
//#endregion
exports.default = VirtualInput;
