import { ClickableTile } from '@carbon/react';
import PropTypes from 'prop-types';
import React__default from 'react';
import classnames from 'classnames';
import { settings } from '../../constants/Settings.js';
import { Add } from '@carbon/icons-react';

// const { g10 } = v10;
var iotPrefix = settings.iotPrefix;
var propTypes = {
  /** Title to show on the card */
  title: PropTypes.string.isRequired,
  /** Callback function when icon is clicked */
  onClick: PropTypes.func.isRequired,
  testId: PropTypes.string
};

/**
 * Clickable card that shows "Add" button
 */
var AddCard = function AddCard(_ref) {
  var onClick = _ref.onClick,
    title = _ref.title,
    className = _ref.className,
    testId = _ref.testId;
  return /*#__PURE__*/React__default.createElement(ClickableTile, {
    "data-testid": testId,
    className: classnames("".concat(iotPrefix, "-add-card"), className),
    onClick: onClick
  }, /*#__PURE__*/React__default.createElement("p", {
    className: "".concat(iotPrefix, "-addcard-title")
  }, title), /*#__PURE__*/React__default.createElement(Add, {
    size: 20,
    description: title
  }));
};
AddCard.propTypes = propTypes;
AddCard.defaultProps = {
  testId: 'add-card-tile'
};
AddCard.__docgenInfo = {
  "description": "Clickable card that shows \"Add\" button",
  "methods": [],
  "displayName": "AddCard",
  "props": {
    "testId": {
      "defaultValue": {
        "value": "'add-card-tile'",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    },
    "title": {
      "description": "Title to show on the card",
      "type": {
        "name": "string"
      },
      "required": true
    },
    "onClick": {
      "description": "Callback function when icon is clicked",
      "type": {
        "name": "func"
      },
      "required": true
    }
  }
};
var AddCard$1 = AddCard;

export { AddCard$1 as default };
