"use client"
import * as React from "react"
import { editInV0 } from "@/actions/edit-in-v0"
import { Loader2 } from "lucide-react"
import { useFormStatus } from "react-dom"
import { toast } from "sonner"
import { cn } from "@/lib/utils"
import { Button, ButtonProps } from "@/registry/new-york/ui/button"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/registry/new-york/ui/tooltip"
import { Style } from "@/registry/registry-styles"
type Size = "default" | "icon"
function V0Tooltip({
size,
style = "default",
children,
}: React.PropsWithChildren<{ size: Size; style?: Style["name"] }>) {
if (size === "default") {
return <>{children}>
}
return (
{style === "new-york" ? (
{children}
) : (
<>{children}>
)}
{style === "new-york" ? (
<>Not available in New York>
) : (
<>Open in v0>
)}
)
}
export function V0Button({
name,
size = "default",
disabled,
className,
...props
}: {
name: string
size?: Size
} & ButtonProps) {
const [url, setUrl] = React.useState("https://ui.shadcn.com")
React.useEffect(() => {
setUrl(window.location.href)
}, [])
return (
)
}
function Form({
disabled,
size = "default",
className,
...props
}: Omit, "name">) {
const { pending } = useFormStatus()
return (
)
}
export function V0Logo({ className, ...props }: React.ComponentProps<"svg">) {
return (
)
}