import { apiRequest } from "./client";

export function getJoinBranches() {
  return apiRequest("/api/branches?allowApply=true");
}

export function getMyMemberApplication() {
  return apiRequest("/api/member-applications/me");
}

export function getMemberApplicationTemplate() {
  return apiRequest("/api/member-applications/template");
}

export function submitMemberApplication(data) {
  return apiRequest("/api/member-applications", {
    method: "POST",
    data
  });
}

export function saveMemberApplicationDraft(data) {
  return apiRequest("/api/member-applications/draft", {
    method: "POST",
    data
  });
}

export function supplementMemberApplication(data) {
  return apiRequest("/api/member-applications/supplement", {
    method: "POST",
    data
  });
}
