"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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/* @flow */
const React = __importStar(require("react"));
const prop_types_1 = __importDefault(require("prop-types"));
{
    CardProps;
}
from;
"./types";
const classnames_1 = __importDefault(require("classnames"));
const ErrorBoundary_1 = __importDefault(require("components/hoc/ErrorBoundary"));
const withStyles_1 = __importDefault(require("components/hoc/withStyles"));
// import './styles.scss';
const styles_1 = __importDefault(require("./styles"));
class SubscriptionCard extends React.Component {
    _renderCard() {
        let { type, price, period, shortDescription, highlighted, classes } = this.props;
        let cardWrapperClass = classnames_1.default(classes.root, { highlighted });
        let cardTypeClass = classnames_1.default(classes.cardType, { highlighted });
        let cardDescClass = classnames_1.default(classes.cardShortDesc, { highlighted });
        return (React.createElement("div", { className: cardWrapperClass },
            React.createElement("div", { className: classes.cardInfoWrapper },
                typeof price !== "undefined" &&
                    price !== null && React.createElement("div", { className: classes.cardPrice }, price),
                period && React.createElement("div", { className: classes.cardPeriod }, period),
                shortDescription && (React.createElement("div", { className: cardDescClass }, shortDescription))),
            type && React.createElement("div", { className: cardTypeClass }, type)));
    }
    render() {
        const { classes } = this.props;
        return (React.createElement(ErrorBoundary_1.default, null,
            React.createElement("div", { className: classes.component }, this._renderCard())));
    }
}
SubscriptionCard.propTypes = {
    type: prop_types_1.default.string,
    price: prop_types_1.default.string,
    period: prop_types_1.default.string,
    shortDescription: prop_types_1.default.string,
    highlighted: prop_types_1.default.bool,
    onFindOutClick: prop_types_1.default.func,
    classes: prop_types_1.default.any
};
SubscriptionCard.defaultProps = {};
exports.default = withStyles_1.default(styles_1.default)(SubscriptionCard);
//# sourceMappingURL=index.js.map