text: "use strict";
  var __importStar = (this && this.__importStar) || function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
      result["default"] = mod;
      return result;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var React = __importStar(require("react"));
  var constants = {
      autoComplete: {
          Off: "off",
          On: "on",
          Name: "name",
          "Honorific: Prefix": "honorific-prefix",
          "Given Name": "given-name",
          "Additional Name": "additional-name",
          "Family Name": "family-name",
          "Honorific: Suffix": "honorific-suffix",
          Nickname: "nickname",
          Email: "email",
          Username: "username",
          "New Password": "new-password",
          "Current Password": "current-password",
          "Organization Title": "organization-title",
          Organization: "organization",
          "Street Address": "street-address",
          "Address Line 1": "address-line1",
          "Address Line 2": "address-line2",
          "Address Line 3": "address-line3",
          "Address Level 4": "address-level4",
          "Address Level 3": "address-level3",
          "Address Level 2": "address-level2",
          "Address Level 1": "address-level1",
          Country: "country",
          "Country Name": "country-name",
          "Postal Code": "postal-code",
          "Credit Card: Name": "cc-name",
          "Credit Card: Given Name": "cc-given-name",
          "Credit Card: Additional Name": "cc-additional-name",
          "Credit Card: Family Name": "cc-family-name",
          "Credit Card: Number": "cc-number",
          "Credit Card: Expiry": "cc-exp",
          "Credit Card: Expiry Month": "cc-exp-month",
          "Credit Card: Expiry Year": "cc-exp-year",
          "Credit Card: CSC": "cc-csc",
          "Credit Card: Type": "cc-type",
          "Transaction: Currency": "transaction-currency",
          "Transaction: Amount": "transaction-amount",
          Language: "language",
          Birthday: "bday",
          "Birthday: Day": "bday-day",
          "Birthday: Month": "bday-month",
          "Birthday: Year": "bday-year",
          Sex: "sex",
          Telephone: "tel",
          "Telephone: Country Code": "tel-country-code",
          "Telephone: National": "tel-national",
          "Telephone: Area Code": "tel-area-code",
          "Telephone: Local": "tel-local",
          "Telephone: Extension": "tel-extension",
          IMPP: "impp",
          URL: "url",
          Photo: "photo"
      },
      autoComplete2: {
          Off: "off",
          On: "on",
          Name: "name",
          "Honorific: Prefix": "honorific-prefix",
          "Given Name": "given-name",
          "Additional Name": "additional-name",
          "Family Name": "family-name",
          "Honorific: Suffix": "honorific-suffix",
          Nickname: "nickname",
          Email: "email",
          Username: "username",
          "New Password": "new-password",
          "Current Password": "current-password",
          "Organization Title": "organization-title",
          Organization: "organization",
          "Street Address": "street-address",
          "Address Line 1": "address-line1",
          "Address Line 2": "address-line2",
          "Address Line 3": "address-line3",
          "Address Level 4": "address-level4",
          "Address Level 3": "address-level3",
          "Address Level 2": "address-level2",
          "Address Level 1": "address-level1",
          Country: "country",
          "Country Name": "country-name",
          "Postal Code": "postal-code",
          "Credit Card: Name": "cc-name",
          "Credit Card: Given Name": "cc-given-name",
          "Credit Card: Additional Name": "cc-additional-name",
          "Credit Card: Family Name": "cc-family-name",
          "Credit Card: Number": "cc-number",
          "Credit Card: Expiry": "cc-exp",
          "Credit Card: Expiry Month": "cc-exp-month",
          "Credit Card: Expiry Year": "cc-exp-year",
          "Credit Card: CSC": "cc-csc",
          "Credit Card: Type": "cc-type",
          "Transaction: Currency": "transaction-currency",
          "Transaction: Amount": "transaction-amount",
          Language: "language",
          Birthday: "bday",
          "Birthday: Day": "bday-day",
          "Birthday: Month": "bday-month",
          "Birthday: Year": "bday-year",
          Sex: "sex",
          Telephone: "tel",
          "Telephone: Country Code": "tel-country-code",
          "Telephone: National": "tel-national",
          "Telephone: Area Code": "tel-area-code",
          "Telephone: Local": "tel-local",
          "Telephone: Extension": "tel-extension",
          IMPP: "impp",
          URL: "url",
          Photo: "photo"
      },
      autoComplete3: {
          Off: "off",
          On: "on",
          Name: "name",
          "Honorific: Prefix": "honorific-prefix",
          "Given Name": "given-name",
          "Additional Name": "additional-name",
          "Family Name": "family-name",
          "Honorific: Suffix": "honorific-suffix",
          Nickname: "nickname",
          Email: "email",
          Username: "username",
          "New Password": "new-password",
          "Current Password": "current-password",
          "Organization Title": "organization-title",
          Organization: "organization",
          "Street Address": "street-address",
          "Address Line 1": "address-line1",
          "Address Line 2": "address-line2",
          "Address Line 3": "address-line3",
          "Address Level 4": "address-level4",
          "Address Level 3": "address-level3",
          "Address Level 2": "address-level2",
          "Address Level 1": "address-level1",
          Country: "country",
          "Country Name": "country-name",
          "Postal Code": "postal-code",
          "Credit Card: Name": "cc-name",
          "Credit Card: Given Name": "cc-given-name",
          "Credit Card: Additional Name": "cc-additional-name",
          "Credit Card: Family Name": "cc-family-name",
          "Credit Card: Number": "cc-number",
          "Credit Card: Expiry": "cc-exp",
          "Credit Card: Expiry Month": "cc-exp-month",
          "Credit Card: Expiry Year": "cc-exp-year",
          "Credit Card: CSC": "cc-csc",
          "Credit Card: Type": "cc-type",
          "Transaction: Currency": "transaction-currency",
          "Transaction: Amount": "transaction-amount",
          Language: "language",
          Birthday: "bday",
          "Birthday: Day": "bday-day",
          "Birthday: Month": "bday-month",
          "Birthday: Year": "bday-year",
          Sex: "sex",
          Telephone: "tel",
          "Telephone: Country Code": "tel-country-code",
          "Telephone: National": "tel-national",
          "Telephone: Area Code": "tel-area-code",
          "Telephone: Local": "tel-local",
          "Telephone: Extension": "tel-extension",
          IMPP: "impp",
          URL: "url",
          Photo: "photo"
      }
  };
  var DateInput = function (_a) {
      var error = _a.error, hintId = _a.hintId, errorId = _a.errorId, label = _a.label, hint = _a.hint, id = _a.id, dayId = _a.dayId, name = _a.name, disabled = _a.disabled, readOnly = _a.readOnly, autoFocus = _a.autoFocus, value = _a.value, spellCheck = _a.spellCheck, autoComplete = _a.autoComplete, onChange = _a.onChange, monthId = _a.monthId, name2 = _a.name2, disabled2 = _a.disabled2, readOnly2 = _a.readOnly2, autoFocus2 = _a.autoFocus2, value2 = _a.value2, spellCheck2 = _a.spellCheck2, autoComplete2 = _a.autoComplete2, onChange2 = _a.onChange2, yearId = _a.yearId, name3 = _a.name3, disabled3 = _a.disabled3, readOnly3 = _a.readOnly3, autoFocus3 = _a.autoFocus3, value3 = _a.value3, spellCheck3 = _a.spellCheck3, autoComplete3 = _a.autoComplete3, onChange3 = _a.onChange3;
      return (React.createElement("div", { className: "g-dateInput-form-group" + (error ? " g-dateInput-form-group--error" : "") },
          React.createElement("fieldset", { "aria-describedby": hintId !== undefined || errorId !== undefined
                  ? "" + (hintId ? hintId : "") + (errorId ? " " + errorId : "")
                  : undefined, className: "g-dateInput-fieldset", role: "group" },
              React.createElement("legend", { className: "g-dateInput-fieldset__legend g-dateInput-fieldset__legend--xl" }, label !== undefined ? (label) : (React.createElement(React.Fragment, null, "Example label"))),
              React.createElement("span", { className: "g-dateInput-hint", id: hintId }, hint !== undefined ? (hint) : (React.createElement(React.Fragment, null, "Example hint"))),
              error !== undefined ? (React.createElement(React.Fragment, null,
                  React.createElement("span", { className: "g-dateInput-error-message", id: errorId },
                      React.createElement("span", { className: "g-dateInput-visually-hidden" }, "Error: "),
                      error !== undefined ? (error) : (React.createElement(React.Fragment, null, "Example error"))))) : (""),
              React.createElement("div", { className: "g-dateInput-date-input", id: id },
                  React.createElement("div", { className: "g-dateInput-date-input__item" },
                      React.createElement("div", { className: "g-dateInput-form-group" },
                          React.createElement("label", { className: "g-dateInput-label g-dateInput-date-input__label", htmlFor: dayId }, "Day"),
                          React.createElement("input", { className: "g-dateInput-input g-dateInput-date-input__input g-dateInput-input--width-2" + (error ? " g-dateInput-input--error" : ""), id: dayId, maxLength: 2, name: name, pattern: "[0-9]*", type: "text", disabled: disabled, readOnly: readOnly, autoFocus: autoFocus, value: value, spellCheck: spellCheck, autoComplete: constants.autoComplete[autoComplete], onChange: onChange }))),
                  React.createElement("div", { className: "g-dateInput-date-input__item" },
                      React.createElement("div", { className: "g-dateInput-form-group" },
                          React.createElement("label", { className: "g-dateInput-label g-dateInput-date-input__label", htmlFor: monthId }, "Month"),
                          React.createElement("input", { className: "g-dateInput-input g-dateInput-date-input__input g-dateInput-input--width-2" + (error ? " g-dateInput-input--error" : ""), id: monthId, maxLength: 2, name: name2, pattern: "[0-9]*", type: "text", disabled: disabled2, readOnly: readOnly2, autoFocus: autoFocus2, value: value2, spellCheck: spellCheck2, autoComplete: constants.autoComplete2[autoComplete2], onChange: onChange2 }))),
                  React.createElement("div", { className: "g-dateInput-date-input__item" },
                      React.createElement("div", { className: "g-dateInput-form-group" },
                          React.createElement("label", { className: "g-dateInput-label govuk-date-input__label", htmlFor: yearId }, "Year"),
                          React.createElement("input", { className: "g-dateInput-input g-dateInput-date-input__input g-dateInput-input--width-4" + (error ? " g-dateInput-input--error" : ""), id: yearId, maxLength: 4, name: name3, pattern: "[0-9]*", type: "text", disabled: disabled3, readOnly: readOnly3, autoFocus: autoFocus3, value: value3, spellCheck: spellCheck3, autoComplete: constants.autoComplete3[autoComplete3], onChange: onChange3 })))))));
  };
  exports.default = DateInput;
  //# sourceMappingURL=DateInput.js.map