/**
 * Plugin Name: paymentPage
 * Description: Улучшение страницы оплаты GetCourse
 * Author: RE-CODE AGENCY
 * Author URL: https://t.me/recode_agency
 */

(() => {
  const intervalId = setInterval(() => {
    if (window?.recode?.paymentPage) {
      clearInterval(intervalId);
      window.recode.paymentPage.init({
        css: ['/pl/layout/79871/2/styles.css'],
        js: ['/pl/layout/79871/3/scripts.js'],
        documents: {
          offer: '/Offer_ANO_DPO_info',
          privacy: '/privacy_policy_ANO',
        },
        contactUs: {
          whatsapp: '+79843330640',
          telegram: 'Getfit_Nikolay_Panasyuk',
        },
        partialPay: {
          variant: 'compact',
        },
        projectName: {
          logo: 'https://fs.getcourse.ru/fileservice/file/download/a/42212/sc/5/h/8b9824c90e27a1f54531ac4276306e65.svg',
          text: '',
        },
        userInfo: {
          shouldExpand: true,
        },
        mainPaymentMethods: {
          isEnabled: true,
          russianCard: '.sberbank-acquiring-block',
          worldCard: '#jetpay',
        },
        paymentMethodRestrictions: {
          isEnabled: true,
          mode: 'activateTab',
          onlyCardOfferIds: [],
          onlyInstallmentOfferIds: [
            3813037, 3953581, 3953583, 3953585, 4029372, 4505532, 4505534, 4505535, 4582952, 4582955, 4582966, 5115030,
            5340670, 5340696, 5491367, 5491368, 5491371, 5491576, 5491581, 5491590, 5647468, 5695751, 5695768, 5695771,
            5713290, 5713295, 6009432, 6009438, 6083876, 6083882, 6083883, 6101400, 6101403, 6179352, 6179363, 6179373,
            6263677, 6264666, 6379034, 6379045, 6379056, 6401998, 6402001, 6402003, 6449767, 6492272, 6492279, 6492286,
            6650564, 6650565, 6650566, 7011539, 7011552, 7011698, 7040101, 7040103, 7048661, 7199114, 7199119, 7377861,
            7379455, 7379465, 7379597, 7379600, 7379614, 7379616, 7391065, 7391074, 7391078, 7442468, 7442479, 7617899,
            7617915, 7617922, 7695218, 7695220, 7695221, 7720399, 7720408, 7720409, 7835589, 7835593, 6492279,
          ],
          hideMainMethodsOnInstallment: true,
          ignoreOnPartialPayment: true,
        },
      });
    }
  }, 100);
})();