/** @jsxRuntime classic */ /** @jsx jsx */ import { Box, Card, Inline, jsx, Link, Skeleton, SkeletonLines, Stack, Text, useContainerSize, } from "@front10/base-elements"; import * as React from "react"; import { SingleCardProps } from "../CardProps"; import { TiktokImage } from "./TiktokImage"; import { ellipsis } from "polished"; function TiktokB( { data: { image, imageAltText = "", //likes count text1, //comment counts text2, //caption text text3, text9: gifUrl, text10: videoUrl, link, } = {}, showText1 = true, showText2 = true, showText3 = true, showText9: showGif, showText10: showVideo, imageCover = "cover", onCardClick, onCallToActionClick, tabIndex, isLoading, ...props }: SingleCardProps, ref: React.Ref ) { const cardWidth = useContainerSize(ref as any); let mediaShown: "image" | "video" | "gif" = "image"; if (showVideo && videoUrl) { mediaShown = "video"; } else if (showGif && gifUrl) { mediaShown = "gif"; } return ( ({ position: "relative", width: "100%", ...theme.layout?.cardContainer, minHeight: "fit-content", willChange: "transform", })} className="wx-card" > {cardWidth > 180 ? ( tiktok logo ) : null} {cardWidth > 150 ? ( ) : null} {cardWidth > 150 ? ( {cardWidth > 175 ? ( {isLoading ? ( ) : ( {text1 ? ( {showText1 ? ( {text1} ) : null} ) : null} {text2 ? ( {showText2 ? ( {text2} ) : null} ) : null} )} ) : null} {showText3 ? ( isLoading ? ( ) : ( {text3} ) ) : null} ) : null} ); } const TiktokBMWithRef = React.forwardRef(TiktokB); export { TiktokBMWithRef as TiktokB };