import * as React from 'react';
import { twMerge } from '../../twMerge';
import clsx from 'clsx';
import { Box } from '../Flex';
export function Card(props) {
    const { shadow = true, children, className, style, gap = 2 } = props;
    return (React.createElement(Box, { className: clsx('twa:bg-defaultbackground twa:text-text-on-defaultbackground', 'ab-Card', 'twa:text-3', 'twa:rounded-standard twa:p-2', 'twa:flex twa:flex-col', {
            'twa:shadow-sm': shadow,
            'twa:gap-0': gap === 0,
            'twa:gap-1': gap === 1,
            'twa:gap-2': gap === 2,
            'twa:gap-3': gap === 3,
            'twa:gap-4': gap === 4,
            'twa:gap-8': gap === 8,
        }, className), style: style }, children));
}
const CardTitle = (props) => {
    const { children, className, gap = 2, border = true } = props;
    return (React.createElement("div", { className: twMerge(clsx('ab-Card__title', {
            'twa:flex twa:flex-row': true,
            'twa:items-center': true,
            'twa:text-4 twa:px-2': true,
            'twa:pb-2 twa:border-b': border,
            'twa:border-b-text-on-defaultbackground/20': true,
            'twa:gap-0': gap === 0,
            'twa:gap-1': gap === 1,
            'twa:gap-2': gap === 2,
            'twa:gap-3': gap === 3,
            'twa:gap-4': gap === 4,
            'twa:gap-8': gap === 8,
        }, className)) }, children));
};
const CardBody = (props) => {
    const { children, gap, className } = props;
    return (React.createElement("div", { className: clsx('ab-Card__body', 'twa:overflow-auto twa:min-h-0', 'twa:flex-1 twa:flex twa:flex-col', {
            'twa:gap-0': gap === 0,
            'twa:gap-1': gap === 1,
            'twa:gap-2': gap === 2,
            'twa:gap-3': gap === 3,
            'twa:gap-4': gap === 4,
            'twa:gap-8': gap === 8,
        }, className) }, children));
};
Card.Title = CardTitle;
Card.Body = CardBody;
