var _excluded = ["className", "children", "disabled", "onClick", "target", "to", "rel"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';
import styled from 'styled-components';
import { Link, Typography } from '../..';
var StyledLink = styled(Link).withConfig({
  displayName: "LinkSell__StyledLink",
  componentId: "sc-c5ecjk-0"
})(["color:", ";padding:", "px ", "px;border-radius:", ";&:hover{text-decoration:none;", "}&:active{", "}"], function (p) {
  return p.disabled ? p.theme.color.disabledText : p.theme.color.sell;
}, function (p) {
  return p.theme.spacing.unit(0.5);
}, function (p) {
  return p.theme.spacing.unit(1);
}, function (p) {
  return p.theme.borderRadius2;
}, function (p) {
  return !p.disabled && "\n      color: ".concat(p.theme.color.buttonText, ";\n      background-color: ").concat(p.theme.color.sell, ";\n    ");
}, function (p) {
  return !p.disabled && "background-color: ".concat(p.theme.color.sellActive, ";");
});
export var LinkSell = function LinkSell(_ref) {
  var className = _ref.className,
    children = _ref.children,
    disabled = _ref.disabled,
    onClick = _ref.onClick,
    target = _ref.target,
    to = _ref.to,
    rel = _ref.rel,
    rest = _objectWithoutProperties(_ref, _excluded);
  return React.createElement(StyledLink, _extends({}, disabled ? {
    as: 'span'
  } : {}, {
    className: className,
    disabled: disabled,
    onClick: onClick,
    to: to,
    target: target,
    rel: rel
  }, rest), React.createElement(Typography, {
    type: "secondary",
    weight: "bold",
    color: "inherit"
  }, children));
};
LinkSell.displayName = 'LinkSell';