"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
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 ansi_to_react_1 = __importDefault(require("ansi-to-react"));
const React = __importStar(require("react"));
class StreamText extends React.PureComponent {
    render() {
        const { output } = this.props;
        if (!output) {
            return null;
        }
        const { text, name } = output;
        return (React.createElement(ansi_to_react_1.default, { linkify: true, className: `nteract-display-area-${name}` }, text));
    }
}
exports.StreamText = StreamText;
StreamText.defaultProps = {
    output: null,
    output_type: "stream"
};
exports.default = StreamText;
