import _extends from "@babel/runtime/helpers/extends";
/**
 * 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.
 */
import React from 'react';
import { fg } from '@atlaskit/platform-feature-flags';
import { SmartLinkSize } from '../../constants';
import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';

// ---- EXPORTED METADATA COMPONENTS ---- //
export var AssignedToElement = function AssignedToElement() {
  return /*#__PURE__*/React.createElement(AssignedTo, null);
};
export var AssignedToGroupElement = function AssignedToGroupElement() {
  return /*#__PURE__*/React.createElement(AssignedToGroup, null);
};
export var AttachmentCountElement = function AttachmentCountElement() {
  return /*#__PURE__*/React.createElement(AttachmentCount, null);
};
export var AuthorGroupElement = function AuthorGroupElement() {
  return /*#__PURE__*/React.createElement(AuthorGroup, null);
};
export var ChecklistProgressElement = function ChecklistProgressElement() {
  return /*#__PURE__*/React.createElement(ChecklistProgress, null);
};
export var CollaboratorGroupElement = function CollaboratorGroupElement() {
  return /*#__PURE__*/React.createElement(CollaboratorGroup, null);
};
export var CommentCountElement = function CommentCountElement(props) {
  return /*#__PURE__*/React.createElement(CommentCount, {
    color: props === null || props === void 0 ? void 0 : props.color,
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
export var CreatedOnElement = function CreatedOnElement() {
  return /*#__PURE__*/React.createElement(CreatedOn, null);
};
export var CreatedByElement = function CreatedByElement() {
  return /*#__PURE__*/React.createElement(CreatedBy, null);
};
export var DueOnElement = function DueOnElement() {
  return /*#__PURE__*/React.createElement(DueOn, null);
};
export var LatestCommitElement = function LatestCommitElement() {
  return /*#__PURE__*/React.createElement(LatestCommit, null);
};
export var LinkIconElement = function LinkIconElement(props) {
  return /*#__PURE__*/React.createElement(LinkIcon, {
    size: (props === null || props === void 0 ? void 0 : props.iconTileSize) === 24 ? SmartLinkSize.Large : SmartLinkSize.Medium,
    render: props === null || props === void 0 ? void 0 : props.render
  });
};
export var LocationElement = function LocationElement() {
  return /*#__PURE__*/React.createElement(Location, null);
};
export var ModifiedByElement = function ModifiedByElement() {
  return /*#__PURE__*/React.createElement(ModifiedBy, null);
};
export var ModifiedOnElement = function ModifiedOnElement(props) {
  return /*#__PURE__*/React.createElement(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
  });
};
export var OwnedByElement = function OwnedByElement(props) {
  return /*#__PURE__*/React.createElement(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
  });
};
export var OwnedByGroupElement = function OwnedByGroupElement(props) {
  return /*#__PURE__*/React.createElement(OwnedByGroup, {
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
export var PreviewElement = function PreviewElement(props) {
  return /*#__PURE__*/React.createElement(Preview, {
    overrideUrl: props === null || props === void 0 ? void 0 : props.url
  });
};
export var PriorityElement = function PriorityElement() {
  return /*#__PURE__*/React.createElement(Priority, null);
};
export var ProgrammingLanguageElement = function ProgrammingLanguageElement() {
  return /*#__PURE__*/React.createElement(ProgrammingLanguage, null);
};
export var ProviderElement = function ProviderElement() {
  return /*#__PURE__*/React.createElement(Provider, null);
};
export var ReactCountElement = function ReactCountElement(props) {
  return /*#__PURE__*/React.createElement(ReactCount, {
    color: props === null || props === void 0 ? void 0 : props.color,
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
export var ReadTimeElement = function ReadTimeElement() {
  return /*#__PURE__*/React.createElement(ReadTime, null);
};
export var SentOnElement = function SentOnElement() {
  return /*#__PURE__*/React.createElement(SentOn, null);
};
export var SnippetElement = function SnippetElement(props) {
  return /*#__PURE__*/React.createElement(Snippet, {
    maxLines: props === null || props === void 0 ? void 0 : props.maxLines,
    content: props === null || props === void 0 ? void 0 : props.text
  });
};
export var SourceBranchElement = function SourceBranchElement() {
  return /*#__PURE__*/React.createElement(SourceBranch, null);
};
export var StateElement = function StateElement(props) {
  return /*#__PURE__*/React.createElement(State, fg('platform_navx_sl_lozenge_max_width') ? {
    maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
  } : undefined);
};
export var StoryPointsElement = function StoryPointsElement() {
  return /*#__PURE__*/React.createElement(StoryPoints, null);
};
export var SubscriberCountElement = function SubscriberCountElement() {
  return /*#__PURE__*/React.createElement(SubscriberCount, null);
};
export var SubTasksProgressElement = function SubTasksProgressElement() {
  return /*#__PURE__*/React.createElement(SubTasksProgress, null);
};
export var TargetBranchElement = function TargetBranchElement() {
  return /*#__PURE__*/React.createElement(TargetBranch, null);
};
export var TitleElement = function TitleElement(props) {
  return /*#__PURE__*/React.createElement(Title, _extends({
    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));
};
export var ViewCountElement = function ViewCountElement() {
  return /*#__PURE__*/React.createElement(ViewCount, null);
};
export var VoteCountElement = function VoteCountElement() {
  return /*#__PURE__*/React.createElement(VoteCount, null);
};

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

export var 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
  };
};
export var CopyLinkAction = function CopyLinkAction(props) {
  return /*#__PURE__*/React.createElement(CopyLinkActionComponent, toActionProps(props));
};
export var CustomAction = function CustomAction(props) {
  return /*#__PURE__*/React.createElement(CustomActionComponent, _extends({}, toActionProps(props), {
    content: props.children,
    onClick: props.onClick
  }));
};
export var DownloadAction = function DownloadAction(props) {
  return /*#__PURE__*/React.createElement(DownloadActionComponent, toActionProps(props));
};
export var FollowAction = function FollowAction(props) {
  return /*#__PURE__*/React.createElement(FollowActionComponent, toActionProps(props));
};
export var PreviewAction = function PreviewAction(props) {
  return /*#__PURE__*/React.createElement(PreviewActionComponent, toActionProps(props));
};
export var UnresolvedAction = function UnresolvedAction(props) {
  return /*#__PURE__*/React.createElement(UnresolvedActionComponent, props);
};
export { CustomUnresolvedAction } from './components/actions';
export { CustomByAccessTypeElement, CustomByStatusElement } from './components/elements';