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 { 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 const AssignedToElement = () => /*#__PURE__*/React.createElement(AssignedTo, null);
export const AssignedToGroupElement = () => /*#__PURE__*/React.createElement(AssignedToGroup, null);
export const AttachmentCountElement = () => /*#__PURE__*/React.createElement(AttachmentCount, null);
export const AuthorGroupElement = () => /*#__PURE__*/React.createElement(AuthorGroup, null);
export const ChecklistProgressElement = () => /*#__PURE__*/React.createElement(ChecklistProgress, null);
export const CollaboratorGroupElement = () => /*#__PURE__*/React.createElement(CollaboratorGroup, null);
export const 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 const CreatedOnElement = () => /*#__PURE__*/React.createElement(CreatedOn, null);
export const CreatedByElement = () => /*#__PURE__*/React.createElement(CreatedBy, null);
export const DueOnElement = () => /*#__PURE__*/React.createElement(DueOn, null);
export const LatestCommitElement = () => /*#__PURE__*/React.createElement(LatestCommit, null);
export const 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 const LocationElement = () => /*#__PURE__*/React.createElement(Location, null);
export const ModifiedByElement = () => /*#__PURE__*/React.createElement(ModifiedBy, null);
export const 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 const 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 const OwnedByGroupElement = props => {
  return /*#__PURE__*/React.createElement(OwnedByGroup, {
    onRender: props === null || props === void 0 ? void 0 : props.onRender
  });
};
export const PreviewElement = props => {
  return /*#__PURE__*/React.createElement(Preview, {
    overrideUrl: props === null || props === void 0 ? void 0 : props.url
  });
};
export const PriorityElement = () => /*#__PURE__*/React.createElement(Priority, null);
export const ProgrammingLanguageElement = () => /*#__PURE__*/React.createElement(ProgrammingLanguage, null);
export const ProviderElement = () => /*#__PURE__*/React.createElement(Provider, null);
export const 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 const ReadTimeElement = () => /*#__PURE__*/React.createElement(ReadTime, null);
export const SentOnElement = () => /*#__PURE__*/React.createElement(SentOn, null);
export const SnippetElement = props => /*#__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 const SourceBranchElement = () => /*#__PURE__*/React.createElement(SourceBranch, null);
export const StateElement = props => /*#__PURE__*/React.createElement(State, {
  maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
});
export const StoryPointsElement = () => /*#__PURE__*/React.createElement(StoryPoints, null);
export const SubscriberCountElement = () => /*#__PURE__*/React.createElement(SubscriberCount, null);
export const SubTasksProgressElement = () => /*#__PURE__*/React.createElement(SubTasksProgress, null);
export const TargetBranchElement = () => /*#__PURE__*/React.createElement(TargetBranch, null);
export const TitleElement = props => /*#__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 const ViewCountElement = () => /*#__PURE__*/React.createElement(ViewCount, null);
export const VoteCountElement = () => /*#__PURE__*/React.createElement(VoteCount, null);

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

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