var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import { jsx as _jsx } from "react/jsx-runtime";
// ============================================================================
// Chatbot Main - Message - Content - Link
// ============================================================================
import { Button } from '@patternfly/react-core';
import { ExternalLinkSquareAltIcon } from '@patternfly/react-icons';
const LinkMessage = (_a) => {
    var { children, target, href, id } = _a, props = __rest(_a, ["children", "target", "href", "id"]);
    if (target === '_blank') {
        return (_jsx(Button, Object.assign({ component: "a", variant: "link", href: href, icon: _jsx(ExternalLinkSquareAltIcon, {}), iconPosition: "end", isInline: true, target: target, 
            // need to explicitly call this out or id doesn't seem to get passed - required for footnotes
            id: id }, props, { children: children })));
    }
    return (
    // need to explicitly call this out or id doesn't seem to get passed - required for footnotes
    _jsx(Button, Object.assign({ isInline: true, component: "a", href: href, variant: "link", id: id }, props, { children: children })));
};
export default LinkMessage;
