"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;
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = __importStar(require("react"));
const react_1 = require("react");
require("../stylesheets/bbb/oauth.scss");
class OAuthPage extends react_1.Component {
    constructor() {
        super(...arguments);
        this.state = {
            loadTime: +new Date()
        };
    }
    // componentDidMount() {
    //   this.setState({ loadTime: +new Date() });
    //   const params = extractOauthUrlParams();
    //   if (params && params.code) {
    //     const { code, state } = params;
    //     upgradeToken({ code, state }).then(({ token }) => this.props.onReceiveToken(token));
    //   }
    // }
    renderDots() {
        const numDots = Math.min(Math.ceil((+new Date() - this.state.loadTime) / 1000), 10);
        return new Array(numDots).map((d) => '.').join('');
    }
    render() {
        return (React.createElement("div", { className: "app" },
            React.createElement("h1", { className: "oauth-loading-message" },
                "Validating..",
                this.renderDots())));
    }
}
exports.default = OAuthPage;
//# sourceMappingURL=oauth.js.map