"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BrainLifeButton = void 0;
const react_1 = __importDefault(require("react"));
const Tooltip_1 = require("../tooltip/Tooltip");
const Button_1 = require("../button/Button");
const BrainLifeButton = ({ datasetId, snapshotVersion, onBrainlife, }) => {
    const url = snapshotVersion
        ? `https://brainlife.io/openneuro/${datasetId}/${snapshotVersion}`
        : `https://brainlife.io/openneuro/${datasetId}`;
    return (react_1.default.createElement(react_1.default.Fragment, null, onBrainlife && (react_1.default.createElement("div", { className: "brainlife-block" },
        react_1.default.createElement(Tooltip_1.Tooltip, { tooltip: "Analyze on brainlife", flow: "up" },
            react_1.default.createElement(Button_1.Button, { className: "brainlife-link", primary: true, size: "small", onClick: () => {
                    window.open(url, '_blank');
                }, label: "brainlife.io" }))))));
};
exports.BrainLifeButton = BrainLifeButton;
