"use client"; import { useState } from "react"; import { useI18n } from "@/translations/provider"; import { LoadingSkeleton } from "./loading-skeleton"; import { LoadingThreeDot } from "./loading-three-dot"; type SwipeButtonProps = { onSuccess: () => void; onCancel?: () => void; text: string; cancelText?: string; disabled?: boolean; isLoading?: boolean; theme?: "default" | "green"; }; export function SwipeButton({ onSuccess, onCancel, text, cancelText, disabled = false, isLoading = false, theme = "default", }: SwipeButtonProps) { const { dictionary: t } = useI18n(); const [clicked, setClicked] = useState(false); if (isLoading) { if (onCancel) { return (