import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { cv } from '../../lib/cv.js';
const card = cv('rounded-[var(--radius)] border border-[var(--border)] bg-[var(--card)] text-[var(--card-foreground)]', {
    variants: {
        padding: {
            none: 'p-0',
            sm: 'p-4',
            md: 'p-6',
            lg: 'p-8',
        },
        elevation: {
            flat: 'shadow-none',
            sm: 'shadow-sm',
            md: 'shadow-md',
            lg: 'shadow-lg',
        },
    },
    defaultVariants: { padding: 'md', elevation: 'sm' },
});
const INTERACTIVE_CLASS = 'transition-shadow hover:shadow-md focus-within:shadow-md';
export const Card = forwardRef(function Card({ padding, elevation, interactive, className, children, ...rest }, ref) {
    const extras = [interactive ? INTERACTIVE_CLASS : '', className].filter(Boolean).join(' ');
    return (_jsx("div", { ref: ref, className: card({ padding, elevation, class: extras }), ...rest, children: children }));
});
/**
 * Header slot — sits at the top of a card. Pair with CardTitle / CardDescription.
 */
export function CardHeader({ className = '', children, ...rest }) {
    return (_jsx("div", { className: `flex flex-col space-y-1.5 ${className}`, ...rest, children: children }));
}
export function CardTitle({ className = '', children, ...rest }) {
    return (_jsx("h3", { className: `text-lg leading-tight font-semibold tracking-tight text-[var(--card-foreground)] ${className}`, ...rest, children: children }));
}
export function CardDescription({ className = '', children, ...rest }) {
    return (_jsx("p", { className: `text-sm text-[var(--muted-foreground)] ${className}`, ...rest, children: children }));
}
export function CardContent({ className = '', children, ...rest }) {
    return (_jsx("div", { className: className, ...rest, children: children }));
}
export function CardFooter({ className = '', children, ...rest }) {
    return (_jsx("div", { className: `flex items-center justify-end gap-2 pt-4 ${className}`, ...rest, children: children }));
}
export { card as cardVariants };
//# sourceMappingURL=Card.js.map