"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const classnames_1 = __importDefault(require("classnames"));
const prop_types_1 = __importDefault(require("prop-types"));
const react_1 = __importDefault(require("react"));
const DangerousHTML_1 = require("../DangerousHTML");
const translate_1 = require("../../../utils/translate");
class CounterText extends react_1.default.Component {
    render() {
        const { template, counter: totalCount } = this.props;
        const className = classnames_1.default('rc-storeCounterText', this.props.className);
        return (react_1.default.createElement("span", { "data-test-automation-id": this.props.testAutomationId, className: className },
            react_1.default.createElement(DangerousHTML_1.DangerousHTML, null, translate_1.translate(template, { totalCount }))));
    }
}
CounterText.propTypes = {
    counter: prop_types_1.default.number.isRequired,
    template: prop_types_1.default.string,
    testAutomationId: prop_types_1.default.string,
    className: prop_types_1.default.string
};
CounterText.defaultProps = {
    template: 'TRANSLATE:TOTAL_AMOUNT',
    testAutomationId: 'storeCounterText',
    className: null
};
exports.CounterText = CounterText;
//# sourceMappingURL=CounterText.js.map