"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.extractAISummaryAction = void 0;
var _constants = require("../../../constants");
var _canShowAction = require("../../../utils/actions/can-show-action");
var _aiSummary = require("../../../utils/ai-summary");
var extractAISummaryAction = exports.extractAISummaryAction = function extractAISummaryAction(response, url, actionOptions, aiSummaryConfig) {
  if (!(0, _canShowAction.canShowAction)(_constants.CardAction.AISummaryAction, actionOptions) || !(0, _aiSummary.getIsAISummaryEnabled)(aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.isAdminHubAIEnabled, response) || !url) {
    return;
  }
  return {
    url: url
  };
};