import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children"],
    _excluded2 = ["variant"];
import React from "react";
import Button from "../../next/Button";
import Link from "../../Link";
import Typography from "../../Typography";
var ButtonTerciary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
  var children = _ref.children,
      restProps = _objectWithoutProperties(_ref, _excluded);

  {
    /* @ts-ignore */
  }
  return /*#__PURE__*/React.createElement(Link, _extends({
    ref: ref
  }, restProps), /*#__PURE__*/React.createElement(Typography, {
    component: "span",
    variant: "inputText",
    align: "center",
    color: "inherit"
  }, children));
});
var ComponentVariant = {
  primary: Button,
  terciary: ButtonTerciary
};
var ComponentVariantProps = {
  primary: {
    variant: "primary",
    layout: "position"
  },
  terciary: {
    color: "neutral",
    layout: "position"
  }
};
var DialogFooterButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var _props$variant = props.variant,
      variant = _props$variant === void 0 ? "primary" : _props$variant,
      restProps = _objectWithoutProperties(props, _excluded2);

  var Component = ComponentVariant[variant];
  return (
    /*#__PURE__*/
    // @ts-ignore
    React.createElement(Component, _extends({
      ref: ref
    }, ComponentVariantProps[variant], restProps))
  );
});
export default DialogFooterButton;