import { joinURL as o } from "ufo";
import { createKycSvg as s, createPassportSvg as a } from "@arcblock/ux/lib/Util/passport";
import { BLOCKLET_SERVICE_PATH_PREFIX as e } from "@arcblock/ux/lib/Util/constant";
const l = (t) => {
  const { response: r } = t;
  return r ? `Request failed: ${r.status} ${r.statusText}: ${JSON.stringify(r.data)}` : t.message;
}, g = (t) => t.scope === "kyc" ? s({
  ...t,
  issuerAvatarUrl: o(window.location.origin, e, "/blocklet/logo"),
  type: t.role
}) : a({
  ...t,
  issuerAvatarUrl: o(window.location.origin, e, "/blocklet/logo")
});
export {
  g as createPassportSvg,
  l as formatAxiosError
};
