<script>
import {authenticatedRequest} from "@/components/session/authenticatedRequest.vue";
import {handleEconomicError} from "@/components/request/HandleEconomicError.vue";
import { API_keys } from "@/components/session/token/superUser/modules/reCAPTCHA/ApiKeys.vue";
import { Config } from "@/components/session/token/superUser/modules/Email/Config.vue";

/**
 * The Email object
 */
export const Email = {
  meta: {
    title: "Email",
    icon: "fas fa-envelope",
    description: "Email konfiguration",
    endpoint: "/email/config",
    config_endpoint: "/configuration/email",
    labels: {
      single: "email konfiguration",
      multiple: "email konfigurationer"
    }
  },
  config: Config,
  sendTestEmail: async (email) => {
    return authenticatedRequest(
        "/email/config/test",
        "POST",
        {
          email: email
        }
    )
  },
};

</script>