import { Toast, resolveValue, toast } from 'react-hot-toast';

interface CustomToastProps {
  t: Toast;
}

export const CustomToastRender = ({ t }: CustomToastProps) => {
  return (
    <div className="flex items-center justify-between gap-3 bg-luxury-dark border border-luxury-gold rounded-lg px-4 py-3">
      <span className="text-luxury-light whitespace-pre-line">
        {resolveValue(t.message, t)}
      </span>

      <button
        onClick={() => toast.dismiss(t.id)}
        className="text-luxury-gold hover:text-yellow-300 transition-colors flex-shrink-0 font-bold text-lg leading-none"
      >
        ✕
      </button>
    </div>
  );
};
