'use client'
import type { ComponentProps, HTMLAttributes } from 'react'
import { type LucideIcon, XIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip'
export type ArtifactProps = HTMLAttributes
export const Artifact = ({ className, ...props }: ArtifactProps) => (
)
export type ArtifactHeaderProps = HTMLAttributes
export const ArtifactHeader = ({
className,
...props
}: ArtifactHeaderProps) => (
)
export type ArtifactCloseProps = ComponentProps
export const ArtifactClose = ({
className,
children,
size = 'sm',
variant = 'ghost',
...props
}: ArtifactCloseProps) => {
const { t } = useTranslation()
return (
)
}
export type ArtifactTitleProps = HTMLAttributes
export const ArtifactTitle = ({ className, ...props }: ArtifactTitleProps) => (
)
export type ArtifactDescriptionProps = HTMLAttributes
export const ArtifactDescription = ({
className,
...props
}: ArtifactDescriptionProps) => (
)
export type ArtifactActionsProps = HTMLAttributes
export const ArtifactActions = ({
className,
...props
}: ArtifactActionsProps) => (
)
export type ArtifactActionProps = ComponentProps & {
tooltip?: string
label?: string
icon?: LucideIcon
}
export const ArtifactAction = ({
tooltip,
label,
icon: Icon,
children,
className,
size = 'sm',
variant = 'ghost',
...props
}: ArtifactActionProps) => {
const button = (
)
if (tooltip) {
return (
{tooltip}
)
}
return button
}
export type ArtifactContentProps = HTMLAttributes
export const ArtifactContent = ({
className,
...props
}: ArtifactContentProps) => (
)