"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getInputPropsByType = void 0;
const getInputPropsByType = type => {
  switch (type) {
    case "credit-card":
      return {
        valueFormat: v => v.replace(/\D/g, "").replace(/\d{4}?(?=.)/g, "$& "),
        textInputProps: {
          autoComplete: "cc-number",
          keyboardType: "numeric",
          textContentType: "creditCardNumber",
          inputMode: "numeric",
          returnKeyType: "done"
        }
      };
    case "iban":
      return {
        valueFormat: v => v.replace(/\s/g, "").replace(/.{4}/g, "$& ").trim(),
        textInputProps: {
          autoComplete: "off",
          keyboardType: "default",
          textContentType: "none",
          inputMode: "text",
          returnKeyType: "done",
          autoCapitalize: "characters"
        }
      };
    default:
      return undefined;
  }
};
exports.getInputPropsByType = getInputPropsByType;
//# sourceMappingURL=index.js.map