import Image from "$/uwil/Image"; import SafeHtml from "@/components/safe-html"; import { Separator } from "@/components/ui/separator"; import { BgColorName, bgColors, fonts, ImageShapeName, imageShapes, } from "@/front/lib/constants"; import { sanitizeRichHtml } from "@/lib/sanitize-html"; import { cn } from "@/lib/utils"; import { ImageProps, TextProps } from "@/types/front"; export type TripleColType = { image: ImageProps; title?: TextProps; subtitle?: TextProps; description: TextProps; }; type Props = { cols: TripleColType[]; variant?: BgColorName; shape?: ImageShapeName; }; export default function TripleCol(props: Readonly) { const { cols, variant, shape = imageShapes.ROUNDED } = props; const width = "w-72 lg:w-56"; const height = "aspect-square lg:h-56"; const separatorVariant = variant === bgColors.BACKGROUND ? bgColors.PRIMARY : bgColors.BACKGROUND; return ( {cols.map((col, index) => { const isLast = index === cols.length - 1; return ( {col?.title?.text || col?.subtitle?.text ? ( {col.title && ( {col.title.text} )} {col.subtitle && ( {col.subtitle.text} )} ) : null} {!isLast && ( )} ); })} ); }