interface RegisterPayload {
  name: string
  cpf: string
  email: string
  phone: string
  position_label: string
  sector_label: string
}

export const useRegisterApi = () => {
  const { apiUrl } = useRuntimeConfig().public

  const registerLandingUser = async (data: RegisterPayload): Promise<void> => {
    await $fetch(`${apiUrl}/api/landing-page-register-user`, {
      method: 'POST',
      body: data,
    })
  }

  return { registerLandingUser }
}
