import { Toast } from "@grace/ui";
// import { callApi } from "@spark/api-base";
// import { getDomain } from "@spark/dbdomain";


/** 处理cookie */
export const saveCookies = async () => {
  // const domain = await getDomain();
  // const data = await callApi(`${domain}/autoLogin/tempSaveCookie`);
  // console.info(`%c cookieId: ${data}`, "font-size: 20px; color: orange");
  // if (!!data) {
  //   localStorage.setItem("cookieId", data);
  // }
};

/** 设置cookies */
export const setCookies = async () => {
  // const cookieId = localStorage.getItem("cookieId");
  // const domain = await getDomain();
  // if (!!cookieId) {
  //   await callApi(`${domain}/autoLogin/resetCookie?duibaTempCookieId=${cookieId}`);
  //   localStorage.removeItem("cookieId");
  // }
};
