"use strict";var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard"),_interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")),_getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")),_inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),React=_interopRequireWildcard(require("react")),_withStyles=_interopRequireDefault(require("../../hoc/withStyles")),_ErrorBoundary=_interopRequireDefault(require("../../hoc/ErrorBoundary")),_FormikTextField=_interopRequireDefault(require("../../bosons/TextField/FormikTextField")),_styles=_interopRequireDefault(require("./styles")),PhoneNumberField=/*#__PURE__*/function(_React$Component){function PhoneNumberField(){return(0,_classCallCheck2.default)(this,PhoneNumberField),(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(PhoneNumberField).apply(this,arguments))}return(0,_inherits2.default)(PhoneNumberField,_React$Component),(0,_createClass2.default)(PhoneNumberField,[{key:"render",value:function render(){var _this$props=this.props,classes=_this$props.classes,areaCodeLabel=_this$props.areaCodeLabel,areaCodePlaceholder=_this$props.areaCodePlaceholder,phoneNumberPlaceholder=_this$props.phoneNumberPlaceholder,phoneNumberLabel=_this$props.phoneNumberLabel,areaCodeFieldName=_this$props.areaCodeFieldName,phoneNumberFieldName=_this$props.phoneNumberFieldName,rest=(0,_objectWithoutProperties2.default)(_this$props,["classes","areaCodeLabel","areaCodePlaceholder","phoneNumberPlaceholder","phoneNumberLabel","areaCodeFieldName","phoneNumberFieldName"]);return React.createElement(_ErrorBoundary.default,null,React.createElement("div",{className:classes.component},React.createElement("div",{className:classes.areaCode},React.createElement(_FormikTextField.default,{label:areaCodeLabel,icon:React.createElement("div",{className:classes.plusIcon},"+"),placeholder:areaCodePlaceholder||"",showClearIcon:!1,showErrorMessage:!1,name:areaCodeFieldName})),React.createElement("div",{className:classes.phoneNumber},React.createElement(_FormikTextField.default,(0,_extends2.default)({},rest,{label:phoneNumberLabel,placeholder:phoneNumberPlaceholder||"",name:phoneNumberFieldName})))))}}]),PhoneNumberField}(React.Component);(0,_defineProperty2.default)(PhoneNumberField,"defaultProps",{areaCodeFieldName:"areaCode",phoneNumberFieldName:"phoneNumber"});var _default=(0,_withStyles.default)(_styles.default)(PhoneNumberField);exports.default=_default;