import { jsx as c } from "react/jsx-runtime";
import { forwardRef as m } from "react";
import { IMaskInput as l } from "react-imask";
const p = (o, t) => {
  const {
    phoneMask: r,
    className: a,
    onChange: e,
    onFocus: n,
    onBlur: s
  } = o;
  return c(
    l,
    {
      // {...other}
      className: a,
      mask: r ?? "",
      placeholder: r == null ? void 0 : r.replaceAll("0", "#"),
      inputRef: t,
      autofix: !0,
      // lazy={true}
      eager: !0,
      // onKeyUp={onChange}
      onAccept: (u) => {
        e && e({
          currentTarget: {
            value: u
          }
        });
      },
      onFocus: n,
      onBlur: s
    }
  );
}, N = m(p);
export {
  N as PhoneNumberIMask
};
