/**
 * Copyright 2018 The AMP HTML Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS-IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import {getMode} from '../../../src/mode';

/**
 * The CMP config should looks like
 * {
 *   'consentInstanceId': string, // The key to store consent information
 *   'checkConsentHref': url, // remote endpoint
 *   'promptUISrc': url, // the src for prompt iframe window
 * }
 */

export const CMP_CONFIG = {};

if (getMode().test || getMode().localDev) {
  CMP_CONFIG['_ping_'] = {
    'consentInstanceId': '_ping_',
    'checkConsentHref': '/get-consent-v1?cid=CLIENT_ID&pid=PAGE_VIEW_ID',
    'promptUISrc':
      '/examples/amp-consent/diy-consent.html?cid=CLIENT_ID&pid=PAGE_VIEW_ID',
  };
}

CMP_CONFIG['appconsent'] = {
  'consentInstanceId': 'appconsent',
  'checkConsentHref': 'https://collector.appconsent.io/amp/check-consent',
  'promptUISrc': 'https://cdn.appconsent.io/loader.html',
};

CMP_CONFIG['ConsentManager'] = {
  'consentInstanceId': 'ConsentManager',
  'checkConsentHref':
    'https://consentmanager.mgr.consensu.org/delivery/ampcheck.php',
  'promptUISrc': 'https://consentmanager.mgr.consensu.org/delivery/ampui.php',
};

CMP_CONFIG['didomi'] = {
  'consentInstanceId': 'didomi',
  'checkConsentHref': 'https://api.privacy-center.org/amp/check-consent',
  'promptUISrc': 'https://sdk-amp.privacy-center.org/loader.html',
};

CMP_CONFIG['iubenda'] = {
  'consentInstanceId': 'iubenda',
  'checkConsentHref': 'https://amp.iubenda.com/checkConsent',
  'promptUISrc': 'https://www.iubenda.com/en/help/22135-cookie-solution-amp',
};

CMP_CONFIG['sirdata'] = {
  'consentInstanceId': 'sirdata',
  'checkConsentHref': 'https://sddan.mgr.consensu.org/api/v1/public/amp/check',
  'promptUISrc': 'https://ui.sddan.mgr.consensu.org/amp.html',
};

CMP_CONFIG['Marfeel'] = {
  'consentInstanceId': 'Marfeel',
  'checkConsentHref': 'https://live.mrf.io/cmp/consents/amp',
  'promptUISrc': 'https://marfeel.mgr.consensu.org/amp/index.html',
};

CMP_CONFIG['Ogury'] = {
  'consentInstanceId': 'Ogury',
  'checkConsentHref': 'https://api.ogury.mgr.consensu.org/v1/check-for-consent',
  'promptUISrc': 'https://www.ogury.mgr.consensu.org/amp.html',
};

CMP_CONFIG['onetrust'] = {
  'consentInstanceId': 'onetrust',
  'checkConsentHref': 'https://cdn.cookielaw.org/amp/consent/check',
  'promptUISrc': ' https://amp.onetrust.mgr.consensu.org/',
};

CMP_CONFIG['opencmp'] = {
  'consentInstanceId': 'opencmp',
  'checkConsentHref': 'https://amp.opencmp.net/consent/check',
  'promptUISrc': 'https://cdn.opencmp.net/tcf-v2/amp/cmp.html',
};

CMP_CONFIG['pubtech'] = {
  'consentInstanceId': 'pubtech',
  'checkConsentHref': 'https://amp.pubtech.it/cmp-amp-check-consent',
  'promptUISrc': 'https://cdn.pubtech.ai/amp/index.html',
};

CMP_CONFIG['quantcast'] = {
  'consentInstanceId': 'quantcast',
  'checkConsentHref':
    'https://apis.quantcast.mgr.consensu.org/amp/check-consent',
  'promptUISrc': 'https://quantcast.mgr.consensu.org/tcfv2/amp.html',
};

CMP_CONFIG['SourcePoint'] = {
  'consentInstanceId': 'SourcePoint',
  'checkConsentHref': 'https://sourcepoint.mgr.consensu.org/consent/v2/amp',
  'promptUISrc': 'https://amp.pm.sourcepoint.mgr.consensu.org/',
};

CMP_CONFIG['UniConsent'] = {
  'consentInstanceId': 'UniConsent',
  'checkConsentHref': 'https://edge.uniconsent.com/amp/check-consent',
  'promptUISrc': 'https://cmp.uniconsent.com/amp/index.html',
};

CMP_CONFIG['Usercentrics'] = {
  'consentInstanceId': 'Usercentrics',
  'checkConsentHref': 'https://consents.usercentrics.eu/amp/checkConsent',
  'promptUISrc': 'https://amp.usercentrics.eu/amp.html',
};

CMP_CONFIG['LiveRamp'] = {
  'consentInstanceId': 'LiveRamp',
  'checkConsentHref': 'https://api.privacymanager.io/amp/check-consent',
  'promptUISrc': 'https://amp-consent-tool.privacymanager.io/1/index.html',
};

@@ -2398,20 +2398,33 @@
 cmp/
+marfeel/amp/check-
 consent
-s/amp
 ',%0A 
@@ -2452,32 +2452,31 @@
 s://
-marfeel.mgr.consensu.org
+live.mrf.io/cmp/marfeel
 /amp

Update Marfeel CMP config (#33350)