import { o as openBlock, c as createElementBlock, a as createBaseVNode, u as unref, az as getUpgradeUrl, b as createVNode, t as toDisplayString, F as Fragment, f as renderList, i as normalizeClass, Z as isPro, m as computed, j as ref } from "./toastStore-CRCNwITM.js";
import { c as useAddonsStore, d as useDialog } from "./addons-CSVIjAyY.js";
import { u as useLicenseStore } from "./license-Boh3_ZVs.js";
import "./useNotices-BpzNuZJ7.js";
import "./ajax-B_XS1gT5.js";
import "./Modal-B9mMTzc_.js";
const _hoisted_1$1 = { class: "monsterinsights-site-notes-integration-logos" };
const _hoisted_2$1 = { class: "monsterinsights-site-notes-integration-logo-item" };
const _hoisted_3$1 = ["src"];
const _hoisted_4$1 = { class: "monsterinsights-site-notes-integration-logo-item" };
const _hoisted_5$1 = ["src"];
const _hoisted_6$1 = { class: "monsterinsights-site-notes-integration-logo-item" };
const _hoisted_7$1 = ["src"];
const _sfc_main$1 = {
  __name: "SiteNotesIntegrationLogos",
  setup(__props) {
    const miLogo = new URL("" + new URL("../../assets/logo-mi-CN6yrjqJ.svg", import.meta.url).href, import.meta.url).href;
    new URL("" + new URL("../../assets/logo-em-Dwc2Jt52.svg", import.meta.url).href, import.meta.url).href;
    const wpEventSrc = new URL("data:image/svg+xml,%3csvg%20width='54'%20height='47'%20viewBox='0%200%2054%2047'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M53.9989%2013.9778V15.2382C53.9609%2015.4077%2053.9006%2015.574%2053.8879%2015.7457C53.6342%2019.1624%2052.2977%2022.1147%2049.9007%2024.5459C42.7075%2031.8447%2035.4816%2039.1109%2028.2652%2046.3855C27.4553%2047.2015%2026.5174%2047.2047%2025.716%2046.396C18.5112%2039.133%2011.2768%2031.8995%204.12284%2024.588C0.451728%2020.8365%20-0.732501%2016.289%200.429523%2011.1855C1.83897%204.99751%206.94912%200.55631%2013.2668%200.0561758C16.9728%20-0.237587%2020.3489%200.753205%2023.227%203.13279C24.426%204.12464%2025.4939%205.27442%2026.6031%206.37261C26.896%206.66322%2027.0863%206.65901%2027.3697%206.36735C28.2494%205.46184%2029.1111%204.53212%2030.0543%203.69505C33.5921%200.556311%2037.7401%20-0.59242%2042.3766%200.285711C48.1497%201.37969%2052.6339%206.0262%2053.6627%2011.8099C53.7906%2012.529%2053.8879%2013.2545%2054%2013.9768L53.9989%2013.9778Z'%20fill='%23DC3232'%20/%3e%3c/svg%3e", import.meta.url).href;
    const uncannySrc = new URL("" + new URL("../../assets/logo-uncanny-Bx5rB0v5.svg", import.meta.url).href, import.meta.url).href;
    const brandLogoSrc = miLogo;
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1$1, [
        createBaseVNode("div", _hoisted_2$1, [
          createBaseVNode("img", {
            src: unref(brandLogoSrc),
            alt: ""
          }, null, 8, _hoisted_3$1)
        ]),
        createBaseVNode("div", _hoisted_4$1, [
          createBaseVNode("img", {
            src: unref(wpEventSrc),
            alt: ""
          }, null, 8, _hoisted_5$1)
        ]),
        createBaseVNode("div", _hoisted_6$1, [
          createBaseVNode("img", {
            src: unref(uncannySrc),
            alt: ""
          }, null, 8, _hoisted_7$1)
        ])
      ]);
    };
  }
};
const _hoisted_1 = {
  key: 0,
  class: "monsterinsights-site-notes-category"
};
const _hoisted_2 = { class: "monsterinsights-site-notes-wrapper monsterinsights-site-notes-wrapper-lite" };
const _hoisted_3 = { class: "monsterinsights-site-notes-integration-header-text" };
const _hoisted_4 = ["innerHTML"];
const _hoisted_5 = ["textContent"];
const _hoisted_6 = { class: "monsterinsights-site-notes-integration-feature" };
const _hoisted_7 = { class: "monsterinsights-site-notes-integration-feature-column" };
const _hoisted_8 = ["textContent"];
const _hoisted_9 = ["textContent"];
const _hoisted_10 = { class: "monsterinsights-userfeedback-install-box monsterinsights-integration-install-box" };
const _hoisted_11 = { class: "monsterinsights-userfeedback-install-box-step" };
const _hoisted_12 = { class: "monsterinsights-userfeedback-install-box-info" };
const _hoisted_13 = ["textContent"];
const _hoisted_14 = ["disabled", "textContent"];
const _hoisted_15 = { class: "monsterinsights-userfeedback-install-box monsterinsights-integration-install-box" };
const _hoisted_16 = { class: "monsterinsights-userfeedback-install-box-step" };
const _hoisted_17 = { class: "monsterinsights-userfeedback-install-box-info" };
const _hoisted_18 = ["textContent"];
const _hoisted_19 = ["disabled", "textContent"];
const _hoisted_20 = { class: "monsterinsights-userfeedback-install-box monsterinsights-integration-install-box" };
const _hoisted_21 = { class: "monsterinsights-userfeedback-install-box-info" };
const _hoisted_22 = ["textContent"];
const _hoisted_23 = ["disabled", "textContent"];
const _hoisted_24 = { class: "monsterinsights-site-notes-upsell monsterinsights-bg-upsell-integration" };
const _hoisted_25 = { class: "monsterinsights-site-notes-upsell-window" };
const _hoisted_26 = ["textContent"];
const _hoisted_27 = ["innerHTML"];
const _hoisted_28 = { class: "monsterinsights-plus-list" };
const _hoisted_29 = ["textContent"];
const _hoisted_30 = ["href", "textContent"];
const _hoisted_31 = ["href", "textContent"];
const _hoisted_32 = {
  key: 1,
  class: "monsterinsights-site-notes-wrapper"
};
const _hoisted_33 = { class: "monsterinsights-site-notes-integration-header-text" };
const _hoisted_34 = ["innerHTML"];
const _hoisted_35 = ["textContent"];
const _hoisted_36 = { class: "monsterinsights-site-notes-integration-feature" };
const _hoisted_37 = { class: "monsterinsights-site-notes-integration-feature-column" };
const _hoisted_38 = ["textContent"];
const _hoisted_39 = ["textContent"];
const _hoisted_40 = { class: "monsterinsights-userfeedback-install-box monsterinsights-integration-install-box" };
const _hoisted_41 = { class: "monsterinsights-userfeedback-install-box-step" };
const _hoisted_42 = { class: "monsterinsights-userfeedback-install-box-info" };
const _hoisted_43 = ["textContent"];
const _hoisted_44 = ["disabled", "textContent"];
const _hoisted_45 = { class: "monsterinsights-userfeedback-install-box monsterinsights-integration-install-box" };
const _hoisted_46 = { class: "monsterinsights-userfeedback-install-box-step" };
const _hoisted_47 = { class: "monsterinsights-userfeedback-install-box-info" };
const _hoisted_48 = ["textContent"];
const _hoisted_49 = ["disabled", "textContent"];
const _hoisted_50 = { class: "monsterinsights-userfeedback-install-box monsterinsights-integration-install-box" };
const _hoisted_51 = { class: "monsterinsights-userfeedback-install-box-info" };
const _hoisted_52 = ["textContent"];
const _hoisted_53 = ["disabled", "textContent"];
const _sfc_main = {
  __name: "SiteNotesIntegration",
  setup(__props) {
    const { __, sprintf } = wp.i18n;
    const pro = isPro();
    const addonsStore = useAddonsStore();
    useLicenseStore();
    useDialog();
    const upgradeUrl = getUpgradeUrl("site-notes", "category-overlay-button");
    const text_main_title = sprintf(
      __("Unlock limitless possibilities with %s", "google-analytics-for-wordpress"),
      "<br /><strong>Uncanny Automator</strong>"
    );
    const text_main_subtitle = __("Easily unlock integrations with the most popular automation plugin for WordPress.", "google-analytics-for-wordpress");
    const text_features_heading = __("Automatically add Site Notes when...", "google-analytics-for-wordpress");
    const text_features = [
      __("New posts or pages are published", "google-analytics-for-wordpress"),
      __("Posts or pages are updated", "google-analytics-for-wordpress"),
      __("WordPress is updated", "google-analytics-for-wordpress"),
      __("Plugins are updated", "google-analytics-for-wordpress"),
      sprintf(
        __("...and get access to our %s API for total customization!", "google-analytics-for-wordpress"),
        "Site Notes"
      )
    ];
    const text_install_heading = __("Install & Activate Uncanny Automator", "google-analytics-for-wordpress");
    const text_run_setup_wizard = __("Run Setup Wizard", "google-analytics-for-wordpress");
    const text_get_started = __("Get Started", "google-analytics-for-wordpress");
    const text_create_a_recipe = __("Create a Recipe", "google-analytics-for-wordpress");
    const text_create_recipe = __("Create Recipe", "google-analytics-for-wordpress");
    const upsell = {
      title: __("Site Notes Important Events", "google-analytics-for-wordpress"),
      subtitle: sprintf(
        __("Designed specifically for agencies and enterprise, our Site Notes integrations addon allows you to create, delete, and update site notes for any website change. Possibilities include:", "google-analytics-for-wordpress")
      ),
      unlock: __("Upgrade and Unlock", "google-analytics-for-wordpress"),
      view_all: __("View all Agency features", "google-analytics-for-wordpress"),
      features: [
        __("Plugin Updates", "google-analytics-for-wordpress"),
        __("WordPress Updates", "google-analytics-for-wordpress"),
        __("New Releases", "google-analytics-for-wordpress"),
        __("Site Health Notifications", "google-analytics-for-wordpress"),
        __("Deployments", "google-analytics-for-wordpress"),
        __("And more!", "google-analytics-for-wordpress")
      ]
    };
    const addonInstalling = ref(false);
    const addonActivating = ref(false);
    const uncannyAddon = computed(() => addonsStore.addons?.["uncanny-automator"] || null);
    const isAddonInstalled = computed(() => !!uncannyAddon.value?.installed);
    const isAddonActive = computed(() => !!uncannyAddon.value?.active);
    const isAddonSetupComplete = computed(() => !!uncannyAddon.value?.setup_complete);
    const firstStepButtonText = computed(() => {
      if (addonInstalling.value) return __("Installing", "google-analytics-for-wordpress");
      if (addonActivating.value) return __("Activating", "google-analytics-for-wordpress");
      if (isAddonInstalled.value && isAddonActive.value) return __("Installed & Activated", "google-analytics-for-wordpress");
      if (isAddonInstalled.value) return __("Activate", "google-analytics-for-wordpress");
      return __("Install", "google-analytics-for-wordpress");
    });
    const loading = computed(() => addonInstalling.value || addonActivating.value);
    const showUpsell = computed(() => {
      return true;
    });
    const showStepTwoDisabled = computed(() => {
      return true;
    });
    async function onInstallClick() {
      return;
    }
    function onClickGetStarted() {
      if (uncannyAddon.value?.wizard_url) {
        window.location = uncannyAddon.value.wizard_url;
      }
    }
    function onClickCreateRecipe() {
      if (uncannyAddon.value?.recipe_url) {
        window.location = uncannyAddon.value.recipe_url;
      }
    }
    return (_ctx, _cache) => {
      return !unref(pro) || showUpsell.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
        createBaseVNode("div", _hoisted_2, [
          createVNode(_sfc_main$1),
          createBaseVNode("div", _hoisted_3, [
            createBaseVNode("h2", { innerHTML: unref(text_main_title) }, null, 8, _hoisted_4),
            createBaseVNode("p", {
              textContent: toDisplayString(unref(text_main_subtitle))
            }, null, 8, _hoisted_5)
          ]),
          createBaseVNode("div", _hoisted_6, [
            createBaseVNode("div", _hoisted_7, [
              createBaseVNode("h3", {
                textContent: toDisplayString(unref(text_features_heading))
              }, null, 8, _hoisted_8),
              createBaseVNode("ul", null, [
                (openBlock(), createElementBlock(Fragment, null, renderList(text_features, (feature, index) => {
                  return createBaseVNode("li", {
                    key: index,
                    textContent: toDisplayString(feature)
                  }, null, 8, _hoisted_9);
                }), 64))
              ])
            ]),
            _cache[0] || (_cache[0] = createBaseVNode("div", { class: "monsterinsights-site-notes-integration-feature-column" }, null, -1))
          ]),
          createBaseVNode("div", _hoisted_10, [
            createBaseVNode("div", _hoisted_11, [
              createBaseVNode("span", {
                class: normalizeClass({ "monsterinsights-integration-install-box-counter-check": isAddonActive.value })
              }, "1", 2)
            ]),
            createBaseVNode("div", _hoisted_12, [
              createBaseVNode("h2", {
                textContent: toDisplayString(unref(text_install_heading))
              }, null, 8, _hoisted_13),
              createBaseVNode("div", null, [
                createBaseVNode("button", {
                  class: "monsterinsights-button",
                  disabled: !unref(pro) || isAddonActive.value || loading.value,
                  onClick: onInstallClick,
                  textContent: toDisplayString(firstStepButtonText.value)
                }, null, 8, _hoisted_14)
              ])
            ])
          ]),
          createBaseVNode("div", _hoisted_15, [
            createBaseVNode("div", _hoisted_16, [
              createBaseVNode("span", {
                class: normalizeClass({ "monsterinsights-integration-install-box-counter-check": isAddonSetupComplete.value })
              }, "2", 2)
            ]),
            createBaseVNode("div", _hoisted_17, [
              createBaseVNode("h2", {
                textContent: toDisplayString(unref(text_run_setup_wizard))
              }, null, 8, _hoisted_18),
              createBaseVNode("div", null, [
                createBaseVNode("button", {
                  class: "monsterinsights-button",
                  disabled: showStepTwoDisabled.value,
                  onClick: onClickGetStarted,
                  textContent: toDisplayString(unref(text_get_started))
                }, null, 8, _hoisted_19)
              ])
            ])
          ]),
          createBaseVNode("div", _hoisted_20, [
            _cache[1] || (_cache[1] = createBaseVNode("div", { class: "monsterinsights-userfeedback-install-box-step" }, [
              createBaseVNode("span", null, "3")
            ], -1)),
            createBaseVNode("div", _hoisted_21, [
              createBaseVNode("h2", {
                textContent: toDisplayString(unref(text_create_a_recipe))
              }, null, 8, _hoisted_22),
              createBaseVNode("div", null, [
                createBaseVNode("button", {
                  class: "monsterinsights-button",
                  disabled: !(isAddonActive.value && isAddonSetupComplete.value),
                  onClick: onClickCreateRecipe,
                  textContent: toDisplayString(unref(text_create_recipe))
                }, null, 8, _hoisted_23)
              ])
            ])
          ])
        ]),
        createBaseVNode("div", _hoisted_24, [
          createBaseVNode("div", _hoisted_25, [
            createBaseVNode("h2", {
              textContent: toDisplayString(upsell.title)
            }, null, 8, _hoisted_26),
            createBaseVNode("p", {
              innerHTML: upsell.subtitle
            }, null, 8, _hoisted_27),
            createBaseVNode("ul", _hoisted_28, [
              (openBlock(true), createElementBlock(Fragment, null, renderList(upsell.features, (feature, index) => {
                return openBlock(), createElementBlock("li", {
                  key: index,
                  textContent: toDisplayString(feature)
                }, null, 8, _hoisted_29);
              }), 128))
            ]),
            createBaseVNode("a", {
              href: unref(upgradeUrl),
              target: "_blank",
              rel: "noopener",
              class: "monsterinsights-button monsterinsights-button-large",
              textContent: toDisplayString(upsell.unlock)
            }, null, 8, _hoisted_30),
            _cache[2] || (_cache[2] = createBaseVNode("br", null, null, -1)),
            createBaseVNode("a", {
              href: unref(upgradeUrl),
              target: "_blank",
              rel: "noopener",
              class: "monsterinsights-button-text",
              textContent: toDisplayString(upsell.view_all)
            }, null, 8, _hoisted_31)
          ])
        ])
      ])) : (openBlock(), createElementBlock("div", _hoisted_32, [
        createVNode(_sfc_main$1),
        createBaseVNode("div", _hoisted_33, [
          createBaseVNode("h2", { innerHTML: unref(text_main_title) }, null, 8, _hoisted_34),
          createBaseVNode("p", {
            textContent: toDisplayString(unref(text_main_subtitle))
          }, null, 8, _hoisted_35)
        ]),
        createBaseVNode("div", _hoisted_36, [
          createBaseVNode("div", _hoisted_37, [
            createBaseVNode("h3", {
              textContent: toDisplayString(unref(text_features_heading))
            }, null, 8, _hoisted_38),
            createBaseVNode("ul", null, [
              (openBlock(), createElementBlock(Fragment, null, renderList(text_features, (feature, index) => {
                return createBaseVNode("li", {
                  key: index,
                  textContent: toDisplayString(feature)
                }, null, 8, _hoisted_39);
              }), 64))
            ])
          ]),
          _cache[3] || (_cache[3] = createBaseVNode("div", { class: "monsterinsights-site-notes-integration-feature-column" }, null, -1))
        ]),
        createBaseVNode("div", _hoisted_40, [
          createBaseVNode("div", _hoisted_41, [
            createBaseVNode("span", {
              class: normalizeClass({ "monsterinsights-integration-install-box-counter-check": isAddonActive.value })
            }, "1", 2)
          ]),
          createBaseVNode("div", _hoisted_42, [
            createBaseVNode("h2", {
              textContent: toDisplayString(unref(text_install_heading))
            }, null, 8, _hoisted_43),
            createBaseVNode("div", null, [
              createBaseVNode("button", {
                class: "monsterinsights-button",
                disabled: isAddonActive.value || loading.value,
                onClick: onInstallClick,
                textContent: toDisplayString(firstStepButtonText.value)
              }, null, 8, _hoisted_44)
            ])
          ])
        ]),
        createBaseVNode("div", _hoisted_45, [
          createBaseVNode("div", _hoisted_46, [
            createBaseVNode("span", {
              class: normalizeClass({ "monsterinsights-integration-install-box-counter-check": isAddonSetupComplete.value })
            }, "2", 2)
          ]),
          createBaseVNode("div", _hoisted_47, [
            createBaseVNode("h2", {
              textContent: toDisplayString(unref(text_run_setup_wizard))
            }, null, 8, _hoisted_48),
            createBaseVNode("div", null, [
              createBaseVNode("button", {
                class: "monsterinsights-button",
                disabled: showStepTwoDisabled.value,
                onClick: onClickGetStarted,
                textContent: toDisplayString(unref(text_get_started))
              }, null, 8, _hoisted_49)
            ])
          ])
        ]),
        createBaseVNode("div", _hoisted_50, [
          _cache[4] || (_cache[4] = createBaseVNode("div", { class: "monsterinsights-userfeedback-install-box-step" }, [
            createBaseVNode("span", null, "3")
          ], -1)),
          createBaseVNode("div", _hoisted_51, [
            createBaseVNode("h2", {
              textContent: toDisplayString(unref(text_create_a_recipe))
            }, null, 8, _hoisted_52),
            createBaseVNode("div", null, [
              createBaseVNode("button", {
                class: "monsterinsights-button",
                disabled: !(isAddonActive.value && isAddonSetupComplete.value),
                onClick: onClickCreateRecipe,
                textContent: toDisplayString(unref(text_create_recipe))
              }, null, 8, _hoisted_53)
            ])
          ])
        ])
      ]));
    };
  }
};
export {
  _sfc_main as default
};
