"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var classnames_1 = __importDefault(require("classnames"));
var prop_types_1 = __importDefault(require("prop-types"));
var react_1 = __importDefault(require("react"));
var DangerousHTML_1 = require("../DangerousHTML");
var translate_1 = require("../../../utils/translate");
var CounterText = /** @class */ (function (_super) {
    __extends(CounterText, _super);
    function CounterText() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CounterText.prototype.render = function () {
        var _a = this.props, template = _a.template, totalCount = _a.counter;
        var 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: 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
    };
    return CounterText;
}(react_1.default.Component));
exports.CounterText = CounterText;
//# sourceMappingURL=CounterText.js.map