"use client";
import { Separator } from "./Layout";
import { CommentTiny } from "./Icons/CommentTiny";
import { QuoteTiny } from "./Icons/QuoteTiny";
import { useSmoker } from "./Toast";
import { Tag } from "./Tags";
import { Popover } from "./Popover";
import { TagTiny } from "./Icons/TagTiny";
import { SpeedyLink } from "./SpeedyLink";
export const InteractionPreview = (props: {
quotesCount: number;
commentsCount: number;
tags?: string[];
postUrl: string;
showComments: boolean;
showMentions: boolean;
share?: boolean;
}) => {
let smoker = useSmoker();
let interactionsAvailable =
(props.quotesCount > 0 && props.showMentions) ||
(props.showComments !== false && props.commentsCount > 0);
const tagsCount = props.tags?.length || 0;
return (
{tagsCount === 0 ? null : (
<>
{interactionsAvailable || props.share ? (
) : null}
>
)}
{!props.showMentions || props.quotesCount === 0 ? null : (
{props.quotesCount}
)}
{!props.showComments || props.commentsCount === 0 ? null : (
{props.commentsCount}
)}
{interactionsAvailable && props.share ? (
) : null}
{props.share && (
<>
>
)}
);
};
const TagPopover = (props: { tags: string[] }) => {
return (
{props.tags.length}
}
>
);
};
const TagList = (props: { tags: string[]; className?: string }) => {
return (
{props.tags.map((tag, index) => (
))}
);
};