"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var ageOfDate_1 = require("./util/ageOfDate");
var ResultViewer_1 = require("./ResultViewer");
var cn = require("classnames");
var Results = function (_a) {
    var disableResize = _a.disableResize, setRef = _a.setRef, hideGutters = _a.hideGutters, responses = _a.responses;
    return (<div className={cn('result-window', {
        disableResize: disableResize,
        isSubscription: responses.length > 1,
    })} ref={setRef}>
    <style jsx={true}>{"\n      .result-window {\n        @p: .bgDarkBlue, .nosb, .relative;\n      }\n\n      .result-window.disableResize :global(.CodeMirror-gutters) {\n        cursor: default !important;\n      }\n\n      .subscription-time {\n        @p: .relative;\n        height: 17px;\n        margin-top: 12px;\n        margin-bottom: 4px;\n        &:before {\n          @p: .absolute, .w100;\n          content: '';\n          top: 9px;\n          left: 95px;\n          border-top: 1px solid $white20;\n        }\n      }\n\n      .subscription-time-text {\n        @p: .bgDarkBlue, .white50, .f12;\n        padding-left: 15px;\n      }\n\n      .result-viewer-wrapper {\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        bottom: 0;\n        overflow: auto;\n      }\n      .isSubscription .result-viewer-wrapper {\n        position: relative;\n      }\n    "}</style>
    {responses.map(function (response) { return (<div key={response.resultID || String(response.time)}>
        {responses.length > 1 &&
        response.time && (<div className="subscription-time">
              <div className="subscription-time-text">
                {ageOfDate_1.default(response.time)}
              </div>
            </div>)}
        <div className="result-viewer-wrapper">
          <ResultViewer_1.ResultViewer value={response.date} hideGutters={hideGutters}/>
        </div>
      </div>); })}
  </div>);
};
exports.default = Results;
//# sourceMappingURL=Results.jsx.map