"use client"

import { useMutation } from "@tanstack/react-query"
import { apiClient } from "../client"

export function useListUnsubscribeMailto() {
  return useMutation({
    mutationFn: (messageId: string) =>
      apiClient.post<{ sent: boolean; mailto: string; subject?: string }>(
        `/mail/messages/${messageId}/list-unsubscribe-mailto`
      ),
  })
}
