import { auth } from "./auth.js";
import { hook } from "./hook.js";
const createCallbackAuth = function createCallbackAuth2(options) {
  if (!options || !options.callback) {
    throw new Error(
      "[@octokit/auth-callback] No options.callback passed to createCallbackAuth"
    );
  }
  if (typeof options.callback !== "function") {
    throw new Error(
      "[@octokit/auth-callback] options.callback passed to createCallbackAuth is not a function"
    );
  }
  return Object.assign(auth.bind(null, options.callback), {
    hook: hook.bind(null, options.callback)
  });
};
export {
  createCallbackAuth
};
