import { jsxs as f, jsx as m } from "react/jsx-runtime"; import { useRef as p } from "react"; import { c as i } from "./index.CfM2L_w0.js"; import { a as x } from "./index.CfQlFjZU.js"; const C = "creator_container_CX4l3", F = "creator_container__error_FsqiB", y = "creator_container__disabled_p2rFb", b = "creator_container__readOnly_-o-uG", k = "creator_input_UfxEm", t = { container: C, container__error: F, container__disabled: y, container__readOnly: b, input: k }, O = ({ ...o }) => { const n = p(null); function c(r) { r.target !== n.current && n.current?.click(); } function e(r) { r.target !== n.current && n.current?.focus(); } return { ...o, inputRef: n, onContainerClick: c, onContainerFocus: e }; }, h = ({ prefixIcon: o, suffixIcon: n, suffixText: c, isDisabled: e, isError: r, inputClassName: s, inputContainerClassName: _, inputRef: l, onContainerClick: u, onContainerFocus: d, ...a }) => /* @__PURE__ */ f( "div", { className: i(t.container, _, { [t.container__error]: r, [t.container__disabled]: e, [t.container__readOnly]: a.readOnly }), onClick: u, onFocus: d, tabIndex: 0, children: [ o, /* @__PURE__ */ m( "input", { ref: l, type: "text", className: i(t.input, s), disabled: e, ...a } ), c, n ] } ), j = x(h, O); export { j as T };