"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 _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")),_propTypes=_interopRequireDefault(require("prop-types")),_reactStripeElements=require("react-stripe-elements"),_withStyles=_interopRequireDefault(require("../../hoc/withStyles")),_CardSection=_interopRequireDefault(require("./CardSection")),_styles=_interopRequireDefault(require("./styles")),CreditCardDetailForm=/*#__PURE__*/function(_React$Component){function CreditCardDetailForm(props){var _this;return(0,_classCallCheck2.default)(this,CreditCardDetailForm),_this=(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(CreditCardDetailForm).call(this,props)),_this.state={elementFontSize:450>window.innerWidth?"14px":"18px"},window.addEventListener("resize",function(){450>window.innerWidth&&"14px"!==_this.state.elementFontSize?_this.setState({elementFontSize:"14px"}):450<=window.innerWidth&&"18px"!==_this.state.elementFontSize&&_this.setState({elementFontSize:"18px"})}),_this}return(0,_inherits2.default)(CreditCardDetailForm,_React$Component),(0,_createClass2.default)(CreditCardDetailForm,[{key:"render",value:function render(){var classes=this.props.classes,elementFontSize=this.state.elementFontSize;return React.createElement(_reactStripeElements.Elements,{fontSize:elementFontSize},React.createElement(_CardSection.default,{classes:classes,fontSize:elementFontSize}))}}]),CreditCardDetailForm}(React.Component);(0,_defineProperty2.default)(CreditCardDetailForm,"propTypes",{classes:_propTypes.default.any});var _default=(0,_withStyles.default)(_styles.default)(CreditCardDetailForm);exports.default=_default;