import { useMemo } from "react";
import { parseInstance } from ".//request-service-provider/parse-instance.js";
const useIframeSandboxDomain = (explicitDomain, instance) => {
  return useMemo(() => {
    if (explicitDomain) {
      return explicitDomain;
    }
    if (!instance) {
      return void 0;
    }
    const { metaSiteId } = parseInstance(instance);
    return metaSiteId ? `https://${metaSiteId}.filesusr.com` : void 0;
  }, [explicitDomain, instance]);
};
export {
  useIframeSandboxDomain
};
//# sourceMappingURL=use-iframe-sandbox-domain.js.map
