"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const external_link_alt_icon_1 = require("@patternfly/react-icons/dist/js/icons/external-link-alt-icon");
const ExternalLink = ({ href, onClick, children }) => {
    const handleClick = (event) => {
        event.stopPropagation(); // Stop event propagation here
        if (onClick) {
            onClick(event);
        }
    };
    return (react_1.default.createElement(react_core_1.Content, { component: "a", href: href, onClick: handleClick, target: "_blank", rel: "noopener noreferrer" },
        children ? children : href,
        " ",
        react_1.default.createElement(external_link_alt_icon_1.ExternalLinkAltIcon, { color: "rgb(0, 123, 186)" })));
};
exports.default = ExternalLink;
//# sourceMappingURL=ExternalLink.js.map