import React from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
const CallToAction = ({
  children,
  data: {
    text,
    url,
    target
  },
  'data-test': dataTest,
  style
}) => {
  if (!url && !text) {
    return /*#__PURE__*/_jsx("span", {
      children: children || null
    });
  }
  const anchorTarget = target === '' ? undefined : target;
  return /*#__PURE__*/_jsx("a", {
    href: url,
    target: anchorTarget,
    style: style,
    "data-test": dataTest,
    children: children || text
  });
};
export default CallToAction;