/** THEME */
import Section from "$/uwil/Section";
import TripleCol, { TripleColType } from "$/uwil/TripleCol";
import { ButtonProps } from "@/components/ui/button";
import {
BgColorName,
bgColors,
ImageShapeName,
imageShapes,
} from "@/front/lib/constants";
import { cn } from "@/lib/utils";
import { CustomButtonVariant, TextProps } from "@/types/front";
type TripleColSectionProps = {
title?: TextProps;
description?: TextProps;
cols: TripleColType[];
button?: {
label: string;
href: string;
variant?: ButtonProps["variant"] | CustomButtonVariant;
};
variant?: BgColorName;
className?: string;
shape?: ImageShapeName;
};
/**
* TripleColSection
*
* A section component designed to display:
* - a centered title
* - a three-column layout (`TripleCol`)
* - an optional call-to-action button
*
* This component is a wrapper around the `Section` layout component,
* and injects a `TripleCol` grid as its content.
*
* Behavior:
* - The title is required and always displayed.
* - The button is optional; when provided:
* - a default right chevron icon is automatically added
* - the button is positioned at the bottom of the section
* - The background variant defaults to `BACKGROUND` if not specified.
*
* @param {TripleColSectionProps} props
*
* @property {TextProps} title - Optional Main title displayed at the top (required)
* @property {TextProps} description - Optional description
* @property {TripleColType[]} cols - Array of 3 column items rendered inside `TripleCol`
* @property {Object} button - Optional CTA button
* @property {string} button.label - Button text
* @property {string} button.href - Link target
* @property {ImageShapeName} shape - Optional, shape of the image
* @property {string} button.variant - Button style variant
* @property {BgColorName} variant - Section background theme (default: BACKGROUND)
*
* @example
*
*/
export default function TripleColSection(props: TripleColSectionProps) {
const {
title,
description,
cols,
button,
variant = bgColors.BACKGROUND,
className,
shape = imageShapes.ROUNDED,
} = props;
return (
);
}