'use strict';

const OrgHeader = (function () {
    function OrgHeader(container, config) {
        BaseComponent.call(this, container);
        this.config = config || {};
    }

    OrgHeader.prototype = Object.create(BaseComponent.prototype);
    OrgHeader.prototype.constructor = OrgHeader;

    OrgHeader.prototype.render = function () {
        const reputation = this.config.reputation || 1250;
        const funds = this.config.funds || 45000;

        return `
    <div class="org-header">
        <h1 class="page-title">Black Rifle Company</h1>
        <div class="org-stats">
            <span class="org-reputation">Reputation: <strong>${reputation.toLocaleString()}</strong></span>
            <span class="org-funds">Funds: <strong>$${funds.toLocaleString()}</strong></span>
        </div>
    </div>
    `;
    };

    return OrgHeader;
})();
