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 __());
    };
})();
import classnames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { DangerousHTML } from '../DangerousHTML';
import { translate } from '../../../utils/translate';
import lang from '../../../lang/common/index-en_US';
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('rc-storeCounterText', this.props.className);
        return (React.createElement("span", { "data-test-automation-id": this.props.testAutomationId, className: className },
            React.createElement(DangerousHTML, null, translate(template || '', { totalCount: totalCount }))));
    };
    CounterText.propTypes = {
        counter: PropTypes.number.isRequired,
        template: PropTypes.string,
        testAutomationId: PropTypes.string,
        className: PropTypes.string
    };
    CounterText.defaultProps = {
        get template() {
            return lang.TOTAL_AMOUNT;
        },
        testAutomationId: 'storeCounterText',
        className: null
    };
    return CounterText;
}(React.Component));
export { CounterText };
//# sourceMappingURL=CounterText.js.map