"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CustomAction = exports.CreatedOnElement = exports.CreatedByElement = exports.CopyLinkAction = exports.CommentCountElement = exports.CollaboratorGroupElement = exports.ChecklistProgressElement = exports.AuthorGroupElement = exports.AttachmentCountElement = exports.AssignedToGroupElement = exports.AssignedToElement = void 0;
Object.defineProperty(exports, "CustomByAccessTypeElement", {
  enumerable: true,
  get: function get() {
    return _elements.CustomByAccessTypeElement;
  }
});
Object.defineProperty(exports, "CustomByStatusElement", {
  enumerable: true,
  get: function get() {
    return _elements.CustomByStatusElement;
  }
});
Object.defineProperty(exports, "CustomUnresolvedAction", {
  enumerable: true,
  get: function get() {
    return _actions.CustomUnresolvedAction;
  }
});
exports.toActionProps = exports.VoteCountElement = exports.ViewCountElement = exports.UnresolvedAction = exports.TitleElement = exports.TargetBranchElement = exports.SubscriberCountElement = exports.SubTasksProgressElement = exports.StoryPointsElement = exports.StateElement = exports.SourceBranchElement = exports.SnippetElement = exports.SentOnElement = exports.ReadTimeElement = exports.ReactCountElement = exports.ProviderElement = exports.ProgrammingLanguageElement = exports.PriorityElement = exports.PreviewElement = exports.PreviewAction = exports.OwnedByGroupElement = exports.OwnedByElement = exports.ModifiedOnElement = exports.ModifiedByElement = exports.LocationElement = exports.LinkIconElement = exports.LatestCommitElement = exports.FollowAction = exports.DueOnElement = exports.DownloadAction = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _constants = require("../../constants");
var _actions = require("./components/actions");
var _elements = require("./components/elements");
/**
 * This file contains export components and API for FlexibleCard components.
 * For internal usage for access to all available props, please use following
 * - ./components/elements for metadata component
 * - ./components/actions for action component
 *
 * DO NOT add a new prop to these components until we are ready to support it externally.
 */

// ---- EXPORTED METADATA COMPONENTS ---- //
var AssignedToElement = exports.AssignedToElement = function AssignedToElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.AssignedTo, null);
};
var AssignedToGroupElement = exports.AssignedToGroupElement = function AssignedToGroupElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.AssignedToGroup, null);
};
var AttachmentCountElement = exports.AttachmentCountElement = function AttachmentCountElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.AttachmentCount, null);
};
var AuthorGroupElement = exports.AuthorGroupElement = function AuthorGroupElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.AuthorGroup, null);
};
var ChecklistProgressElement = exports.ChecklistProgressElement = function ChecklistProgressElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.ChecklistProgress, null);
};
var CollaboratorGroupElement = exports.CollaboratorGroupElement = function CollaboratorGroupElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.CollaboratorGroup, null);
};
var CommentCountElement = exports.CommentCountElement = function CommentCountElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.CommentCount, {
    color: props === null || props === void 0 ? void 0 : props.color,
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
var CreatedOnElement = exports.CreatedOnElement = function CreatedOnElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.CreatedOn, null);
};
var CreatedByElement = exports.CreatedByElement = function CreatedByElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.CreatedBy, null);
};
var DueOnElement = exports.DueOnElement = function DueOnElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.DueOn, null);
};
var LatestCommitElement = exports.LatestCommitElement = function LatestCommitElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.LatestCommit, null);
};
var LinkIconElement = exports.LinkIconElement = function LinkIconElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.LinkIcon, {
    size: (props === null || props === void 0 ? void 0 : props.iconTileSize) === 24 ? _constants.SmartLinkSize.Large : _constants.SmartLinkSize.Medium,
    render: props === null || props === void 0 ? void 0 : props.render
  });
};
var LocationElement = exports.LocationElement = function LocationElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.Location, null);
};
var ModifiedByElement = exports.ModifiedByElement = function ModifiedByElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.ModifiedBy, null);
};
var ModifiedOnElement = exports.ModifiedOnElement = function ModifiedOnElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.ModifiedOn, {
    hideDatePrefix: props === null || props === void 0 ? void 0 : props.hideDatePrefix,
    color: props === null || props === void 0 ? void 0 : props.color,
    onRender: props === null || props === void 0 ? void 0 : props.onRender,
    fontSize: props === null || props === void 0 ? void 0 : props.fontSize
  });
};
var OwnedByElement = exports.OwnedByElement = function OwnedByElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.OwnedBy, {
    hideFormat: props === null || props === void 0 ? void 0 : props.hideFormat,
    color: props === null || props === void 0 ? void 0 : props.color,
    onRender: props === null || props === void 0 ? void 0 : props.onRender,
    textPrefix: props === null || props === void 0 ? void 0 : props.textPrefix,
    fontSize: props === null || props === void 0 ? void 0 : props.fontSize
  });
};
var OwnedByGroupElement = exports.OwnedByGroupElement = function OwnedByGroupElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.OwnedByGroup, {
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
var PreviewElement = exports.PreviewElement = function PreviewElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.Preview, {
    overrideUrl: props === null || props === void 0 ? void 0 : props.url
  });
};
var PriorityElement = exports.PriorityElement = function PriorityElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.Priority, null);
};
var ProgrammingLanguageElement = exports.ProgrammingLanguageElement = function ProgrammingLanguageElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.ProgrammingLanguage, null);
};
var ProviderElement = exports.ProviderElement = function ProviderElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.Provider, null);
};
var ReactCountElement = exports.ReactCountElement = function ReactCountElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.ReactCount, {
    color: props === null || props === void 0 ? void 0 : props.color,
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
var ReadTimeElement = exports.ReadTimeElement = function ReadTimeElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.ReadTime, null);
};
var SentOnElement = exports.SentOnElement = function SentOnElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.SentOn, null);
};
var SnippetElement = exports.SnippetElement = function SnippetElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.Snippet, {
    maxLines: props === null || props === void 0 ? void 0 : props.maxLines,
    content: props === null || props === void 0 ? void 0 : props.text
  });
};
var SourceBranchElement = exports.SourceBranchElement = function SourceBranchElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.SourceBranch, null);
};
var StateElement = exports.StateElement = function StateElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.State, {
    maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
  });
};
var StoryPointsElement = exports.StoryPointsElement = function StoryPointsElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.StoryPoints, null);
};
var SubscriberCountElement = exports.SubscriberCountElement = function SubscriberCountElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.SubscriberCount, null);
};
var SubTasksProgressElement = exports.SubTasksProgressElement = function SubTasksProgressElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.SubTasksProgress, null);
};
var TargetBranchElement = exports.TargetBranchElement = function TargetBranchElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.TargetBranch, null);
};
var TitleElement = exports.TitleElement = function TitleElement(props) {
  return /*#__PURE__*/_react.default.createElement(_elements.Title, (0, _extends2.default)({
    hideTooltip: props === null || props === void 0 ? void 0 : props.hideTooltip,
    maxLines: props === null || props === void 0 ? void 0 : props.maxLines,
    target: props === null || props === void 0 ? void 0 : props.target,
    theme: props === null || props === void 0 ? void 0 : props.theme,
    size: props === null || props === void 0 ? void 0 : props.size,
    testId: props === null || props === void 0 ? void 0 : props.testId
  }, props !== null && props !== void 0 && props.text ? {
    text: props === null || props === void 0 ? void 0 : props.text
  } : undefined));
};
var ViewCountElement = exports.ViewCountElement = function ViewCountElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.ViewCount, null);
};
var VoteCountElement = exports.VoteCountElement = function VoteCountElement() {
  return /*#__PURE__*/_react.default.createElement(_elements.VoteCount, null);
};

// ---- EXPORTED ACTION COMPONENTS ---- //

var toActionProps = exports.toActionProps = function toActionProps(props) {
  var _props$appearance;
  return {
    appearance: (_props$appearance = props === null || props === void 0 ? void 0 : props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'default',
    icon: undefined
  };
};
var CopyLinkAction = exports.CopyLinkAction = function CopyLinkAction(props) {
  return /*#__PURE__*/_react.default.createElement(_actions.CopyLinkAction, toActionProps(props));
};
var CustomAction = exports.CustomAction = function CustomAction(props) {
  return /*#__PURE__*/_react.default.createElement(_actions.CustomAction, (0, _extends2.default)({}, toActionProps(props), {
    content: props.children,
    onClick: props.onClick
  }));
};
var DownloadAction = exports.DownloadAction = function DownloadAction(props) {
  return /*#__PURE__*/_react.default.createElement(_actions.DownloadAction, toActionProps(props));
};
var FollowAction = exports.FollowAction = function FollowAction(props) {
  return /*#__PURE__*/_react.default.createElement(_actions.FollowAction, toActionProps(props));
};
var PreviewAction = exports.PreviewAction = function PreviewAction(props) {
  return /*#__PURE__*/_react.default.createElement(_actions.PreviewAction, toActionProps(props));
};
var UnresolvedAction = exports.UnresolvedAction = function UnresolvedAction(props) {
  return /*#__PURE__*/_react.default.createElement(_actions.UnresolvedAction, props);
};