import type { ReactNode, FunctionComponent, MouseEvent } from 'react'; import type { ActionsProps, BaseProps, ForwardProps, NoChildrenProp, OmitStrict } from '@pega/cosmos-react-core'; import type { ArticleFeedbackProps, ArticleListHeaderProps } from '../ArticleList/ArticleList.types'; import type { ArticleRatingProps } from './ArticleRating'; import type { ArticleFooterProps } from './ArticleFooter'; import type { ArticleMetaProps } from './ArticleMeta'; type OnReactionWithId = (articleId: BaseArticleProps['articleId'], reaction: ArticleRatingProps['reaction']) => void; export interface BaseArticleProps extends BaseProps, NoChildrenProp { articleId: string; /** Header to show icon , title and any actions on the container */ header?: ArticleListHeaderProps; /** Control for navigating back */ backNavigation?: { title: string; onClick: (e: MouseEvent) => void; }; /** Primary actions which needs to be displayed with an icon */ primaryActions?: { /** Unique id for action, used in onClick callback */ id: string; /** Label for this action, shown in tooltip and used for generating aria-label */ label: string; /** Icon to be displayed in the button */ icon: string; /** Callback triggered when a user clicks of presses enter on the action */ onClick: (id: string, e: MouseEvent) => void; }[]; /** Secondary actions that needs to be pushed under more icon */ secondaryActions?: ActionsProps; /** Article title */ title: string; /** Array of meta data */ meta?: ArticleMetaProps; /** like and dislike status of the article */ feedback?: OmitStrict & { onReaction: OnReactionWithId; }; /** Article content */ content: ReactNode; /** Footer */ footer?: OmitStrict & { feedback?: OmitStrict & { onReaction: OnReactionWithId; }; }; /** Prop to check visibility of skeleton */ loading: boolean; } export type ArticleProps = (BaseArticleProps & { loading?: false; }) | (Partial & { loading: true; }); declare const Article: FunctionComponent; export default Article; //# sourceMappingURL=Article.d.ts.map