import React from "preact/compat";
import { useLabelMask } from "./useLabelMask";
var LabelMask = function LabelMask(props) {
  var field = React.Children.only(props.children);
  var _useLabelMask = useLabelMask(props.labelMask, field.props),
    labelMask = _useLabelMask.labelMask,
    inputProps = _useLabelMask.inputProps;
  var input = React.cloneElement(field, inputProps);
  return /*#__PURE__*/React.createElement(React.Fragment, null, labelMask, input);
};
export default LabelMask;