"use strict";

exports.__esModule = true;
exports.default = void 0;

require("core-js/modules/web.dom.iterable");

require("core-js/modules/es6.array.iterator");

require("core-js/modules/es6.object.keys");

require("core-js/modules/es6.object.assign");

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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; }

/**
 * @category controls
 * @component link
 * @variations collab-ui-react
 */
var Link = function Link(_ref) {
  var className = _ref.className,
      children = _ref.children,
      color = _ref.color,
      disabled = _ref.disabled,
      tag = _ref.tag,
      theme = _ref.theme,
      props = _objectWithoutPropertiesLoose(_ref, ["className", "children", "color", "disabled", "tag", "theme"]);

  return _react.default.createElement(tag, Object.assign({
    className: 'cui-link' + ("" + (color && " cui-link--" + color || '')) + ("" + (theme && " cui-link--" + theme || '')) + ("" + (className && " " + className || '')),
    disabled: disabled
  }, !disabled && {
    tabIndex: 0
  }, props), children);
};

Link.propTypes = {
  /** @prop Children nodes to render inside Link Component | null */
  children: _propTypes.default.node.isRequired,

  /** @prop Optional css class string | '' */
  className: _propTypes.default.string,

  /** @prop Optional color css styling | 'blue' */
  color: _propTypes.default.string,

  /** @prop Sets the attribute disabled to the Link | false */
  disabled: _propTypes.default.bool,

  /** @prop Set HTML tag type | 'a' */
  tag: _propTypes.default.oneOf(['a', 'div', 'span']),

  /** @prop Set Link theme | ''  */
  theme: _propTypes.default.string
};
Link.defaultProps = {
  children: null,
  className: '',
  color: 'blue',
  disabled: false,
  tag: 'a',
  theme: ''
};
Link.displayName = 'Link';
var _default = Link;
/**
* @name Default Link
* @description Default Link.
*
* @category controls
* @component link
* @section default
*
* @js
import { Link } from '@collab-ui/react';

export default function LinkDefault() {
  return(
    <div className='row' style={{marginBottom: '1rem'}}>
      <div className='columns small-3'>
          <Link>Default</Link>
          <Link tag='div'>Tag Prop(div)</Link>
          <Link tag='span'>Tag Prop(span)</Link>
      </div>
    </div>
  );
}

**/

/**
* @name Link Colors
* @description Vary colors by using theme & color props.
*
* @category controls
* @component link
* @section colors
*
* @js
import { Link } from '@collab-ui/react';

export default function LinkDefault() {
  return(
    <div className='row' style={{marginBottom: '1rem'}}>
      <div className='columns small-3'>
        <Link tag='div' color='red'>Color Prop(red)</Link>
      </div>
    </div>
  );
}
*/

exports.default = _default;