"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = useSocialSettings;
var _reactQuery = require("@tanstack/react-query");
var _useAuth = _interopRequireDefault(require("./useAuth"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const STALE_TIME_5_MINUTES = 5 * 60 * 1000;
function useSocialSettings() {
  const {
    client
  } = (0, _useAuth.default)();
  const {
    error,
    isLoading,
    data: socialSettings
  } = (0, _reactQuery.useQuery)({
    queryKey: ['asc-uikit', 'SocialSettings'],
    queryFn: async () => {
      const settings = await (client === null || client === void 0 ? void 0 : client.getSocialSettings());
      return settings;
    },
    enabled: !!client,
    staleTime: STALE_TIME_5_MINUTES
  });
  return {
    socialSettings,
    isLoading,
    error
  };
}
//# sourceMappingURL=useSocialSettings.js.map