export { default as Tooltip } from "./Tooltip.vue"
export { default as TooltipContent } from "./TooltipContent.vue"
export { default as TooltipProvider } from "./TooltipProvider.vue"
export { default as TooltipTrigger } from "./TooltipTrigger.vue"

import type { VariantProps } from "class-variance-authority"
import { cva } from "class-variance-authority"

export const tooltipContentVariants = cva(
    "text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",
    {
        variants: {
            variant: {
                default: ""
            },
            color: {
                default: "bg-foreground",
                muted: "bg-muted text-muted-foreground"
            }
        },
        defaultVariants: {
            variant: "default",
            color: "default",
        },
    }
)

export const tooltipArrowVariants = cva(
    "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]",
    {
        variants: {
            variant: {
                default: ""
            },
            color: {
                default: "bg-foreground fill-foreground",
                muted: "bg-muted fill-muted"
            }
        },
        defaultVariants: {
            variant: "default",
            color: "default"
        }
    },
)

export type TooltipContentVariants = VariantProps<typeof tooltipContentVariants>
export type TooltipArrowVariants = VariantProps<typeof tooltipArrowVariants>

