import React from "react"
variant?: "solid" | "outline" | "ghost" | "soft" | "link"
radius?: "full" | "large" | "default" | "small" | "none"
size?: "default" | "small" | "large"
color?: "default" | "blue" | "green" | "cerise" | "yellow" | "violet"
const ReactButton: React.FC<ButtonProps> = ({
// Clases de Tailwind para diferentes variantes de colores y tamaños
_ solid: bg-gray-600, hover:bg-gray-700
_ outline: border-gray-200 text-gray-500 hover:border-gray-600 hover:text-gray-600; dark:border-gray-700 dark:hover:text-gray-500 dark:hover:border-gray-600
_ ghost: text-gray-600 hover:bg-gray-100 hover:text-gray-800; dark:text-gray-500 dark:hover:bg-gray-800/30 dark:hover:text-gray-400
_ soft: bg-gray-100 text-gray-800 hover:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-white/10 dark:hover:bg-white/20 dark:text-white dark:hover:text-white
_ link: text-gray-800 hover:text-blue-600 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:text-white/70
* solid: bg-blue-600, hover:bg-blue-700
* outline: border-blue-200 text-blue-500 hover:border-blue-600 hover:text-blue-600 dark:border-blue-700 dark:hover:text-blue-500 dark:hover:border-blue-600
* ghost: text-blue-600 hover:bg-blue-100 hover:text-blue-800; dark:text-blue-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400
* soft: bg-blue-100 text-blue-800 hover:bg-blue-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-white/10 dark:hover:bg-white/20 dark:text-white dark:hover:text-white
* link: text-blue-800 hover:text-blue-600 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:text-white/70
* solid: bg-green-600, hover:bg-green-700
* outline: border-green-200 text-green-500 hover:border-green-600 hover:text-green-600 dark:border-green-700 dark:hover:text-green-500 dark:hover:border-green-600
* ghost: text-green-600 hover:bg-green-100 hover:text-green-800; dark:text-green-500 dark:hover:bg-green-800/30 dark:hover:text-green-400
* soft: bg-green-100 text-green-800 hover:bg-green-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-white/10 dark:hover:bg-white/20 dark:text-white dark:hover:text-white
* link: text-green-800 hover:text-green-600 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:text-white/70
* solid: bg-red-600, hover:bg-red-700
* outline: border-red-200 text-red-500 hover:border-red-600 hover:text-red-600 dark:border-red-700 dark:hover:text-red-500 dark:hover:border-red-600
* ghost: text-red-600 hover:bg-red-100 hover:text-red-800; dark:text-red-500 dark:hover:bg-red-800/30 dark:hover:text-red-400
* soft: bg-red-100 text-red-800 hover:bg-red-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-white/10 dark:hover:bg-white/20 dark:text-white dark:hover:text-white
* link: text-red-800 hover:text-red-600 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:text-white/70
* solid: bg-yellow-600, hover:bg-yellow-700
* outline: border-yellow-200 text-yellow-500 hover:border-yellow-600 hover:text-yellow-600 dark:border-yellow-700 dark:hover:text-yellow-500 dark:hover:border-yellow-600
* ghost: text-yellow-600 hover:bg-yellow-100 hover:text-yellow-800; dark:text-yellow-500 dark:hover:bg-yellow-800/30 dark:hover:text-yellow-400
* soft: bg-yellow-100 text-yellow-800 hover:bg-yellow-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-white/10 dark:hover:bg-white/20 dark:text-white dark:hover:text-white
* link: text-yellow-800 hover:text-yellow-600 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:text-white/70
* solid: bg-violet-600, hover:bg-violet-700
* outline: border-violet-200 text-violet-500 hover:border-violet-600 hover:text-violet-600 dark:border-violet-700 dark:hover:text-violet-500 dark:hover:border-violet-600
* ghost: text-violet-600 hover:bg-violet-100 hover:text-violet-800; dark:text-violet-500 dark:hover:bg-violet-800/30 dark:hover:text-violet-400
* soft: bg-violet-100 text-violet-800 hover:bg-violet-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-white/10 dark:hover:bg-white/20 dark:text-white dark:hover:text-white
* link: text-violet-800 hover:text-violet-600 disabled:opacity-50 disabled:pointer-events-none dark:text-white dark:hover:text-white/70
solid: `${buttonSizes[size]} ${buttonRadius[radius]} cursor-pointer inline-flex items-center gap-x-2 text-sm font-semibold border border-transparent bg-${buttonColors[color]}-600 text-white hover:bg-${buttonColors[color]}-700 disabled:opacity-50 disabled:pointer-events-none`,
outline: `${buttonSizes[size]} inline-flex items-center cursor-pointer gap-x-2 text-sm font-semibold ${buttonRadius[radius]} border border-${buttonColors[color]}-200 text-${buttonColors[color]}-500 hover:border-${buttonColors[color]}-600 hover:text-${buttonColors[color]}-600 disabled:opacity-50 disabled:pointer-events-none dark:border-${buttonColors[color]}-700 dark:text-${buttonColors[color]}-400 dark:hover:text-${buttonColors[color]}-500 dark:hover:border-${buttonColors[color]}-600`,
ghost: `${buttonSizes[size]} inline-flex items-center cursor-pointer gap-x-2 text-sm font-semibold ${buttonRadius[radius]} border border-transparent text-${buttonColors[color]}-600 hover:bg-${buttonColors[color]}-100 hover:text-${buttonColors[color]}-800 disabled:opacity-50 disabled:pointer-events-none dark:text-${buttonColors[color]}-500 dark:hover:bg-${buttonColors[color]}-800/30 dark:hover:text-${buttonColors[color]}-400`,
soft: `${buttonSizes[size]} inline-flex items-center cursor-pointer gap-x-2 text-sm font-semibold ${buttonRadius[radius]} border border-transparent bg-${buttonColors[color]}-100 text-${buttonColors[color]}-800 hover:bg-${buttonColors[color]}-200 disabled:opacity-50 disabled:pointer-events-none dark:hover:bg-${buttonColors[color]}-900 dark:text-${buttonColors[color]}-400`,
light: `${buttonSizes[size]} inline-flex items-center cursor-pointer gap-x-2 text-sm font-medium ${buttonRadius[radius]} border border-${buttonColors[color]}-200 bg-white text-${buttonColors[color]}-800 shadow-sm hover:bg-${buttonColors[color]}-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-800`,
link: `${buttonSizes[size]} inline-flex items-center cursor-pointer gap-x-2 text-sm font-semibold ${buttonRadius[radius]} border border-transparent text-${buttonColors[color]}-600 hover:text-${buttonColors[color]}-800 disabled:opacity-50 disabled:pointer-events-none dark:text-${buttonColors[color]}-500 dark:hover:text-${buttonColors[color]}-400`,
className={`${buttonVariants[variant]} ${
loading && "cursor-not-allowed"
disabled={disabled || loading} >
className="animate-spin h-5 w-5 text-white"
xmlns="http://www.w3.org/2000/svg"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
{icon && <span className="mr-2">{icon}</span>}
export default ReactButton