import * as tslib_1 from "tslib";
import * as React from 'react';
import { RouterLinkOrAnchor } from './RouterLinkOrAnchor';
/**
 * The LinkOrSpan component renders a <Link> (from react-router-dom) if the "to" property is a non-empty string;
 * otherwise it renders the text in a <span> (with no link).
 */
export const LinkOrSpan = (_a) => {
    var { to, className = '', children } = _a, otherProps = tslib_1.__rest(_a, ["to", "className", "children"]);
    return to ? (React.createElement(RouterLinkOrAnchor, Object.assign({ to: to, className: className }, otherProps), children)) : (React.createElement("span", Object.assign({ className: className }, otherProps), children));
};
//# sourceMappingURL=LinkOrSpan.js.map