"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useUser = exports.AuthProvider = exports.AuthContext = void 0;

var _react = require("react");

var _jsxRuntime = require("react/jsx-runtime");

var AuthContext = /*#__PURE__*/(0, _react.createContext)();
exports.AuthContext = AuthContext;

var AuthProvider = function AuthProvider(_ref) {
  var user = _ref.user,
      children = _ref.children;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(AuthContext.Provider, {
    value: user,
    children: children
  });
};

exports.AuthProvider = AuthProvider;

var useUser = function useUser() {
  return (0, _react.useContext)(AuthContext);
};

exports.useUser = useUser;