diff --git a/assets/admin/settings.asset.php b/assets/admin/settings.asset.php index 5a5292b..920eb49 100644 --- a/assets/admin/settings.asset.php +++ b/assets/admin/settings.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '30b78b37fb73b0d86f8d'); + array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'e9e4e88a99fd728885a0'); diff --git a/assets/admin/settings.js b/assets/admin/settings.js index 142d22c..094275a 100644 --- a/assets/admin/settings.js +++ b/assets/admin/settings.js @@ -16,7 +16,7 @@ (0,t.__)("Track %s","gtm-kit"),n),label:(0,t.sprintf)( // translators: %s is the name of the plugin. // translators: %s is the name of the plugin. -(0,t.__)("Activate the %s integration","gtm-kit"),n),optionGroup:"integrations",optionName:i,disabled:a,useSettings:o,useUpdateStateSettings:s})))},Ae=[{label:(0,t.__)("Retail","gtm-kit"),value:"retail"},{label:(0,t.__)("Education","gtm-kit"),value:"education"},{label:(0,t.__)("Flights","gtm-kit"),value:"flights"},{label:(0,t.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,t.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,t.__)("Local deals","gtm-kit"),value:"local"},{label:(0,t.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,t.__)("Travel","gtm-kit"),value:"travel"},{label:(0,t.__)("Custom","gtm-kit"),value:"custom"}],Ie={variant:{default:"gtmkit-feature-upsell--default",card:"gtmkit-feature-upsell--card"}},Oe=({children:e,shouldUpsell:n=!0,className:a="",variant:o="card",cardLink:s="",cardText:r=(0,t.__)("Unlock with premium","gtm-kit"),...l})=>n?(0,m.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Ie.variant[o],a),children:[(0,m.jsx)("div",{className:"gtmkit-space-y-8 gtmkit-opacity-30",children:e}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Button,{as:"a",className:"gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-lg fgtmkit-font-bold gtmkit-py-6 gtmkit-px-8 is-primary",variant:"upsell",href:s,target:"_blank",rel:"noopener",...l,children:r})})]}):e,Re=()=>{const{useSettings:n,useUpdateStateSettings:i,isPremium:a}=(0,e.useContext)(c),o="WooCommerce",s=!window.gtmkitSettings.plugins.woocommerce,r=s||!n.integrations.woocommerce_integration,l=r||!a||!n.general.sgtm_domain,g=l||!n.premium.woocommerce_webhooks;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("WooCommerce","gtm-kit")}),s?(0,m.jsx)(Ce,{pluginName:o}):null,(0,m.jsx)(Ue,{pluginName:o,optionName:"woocommerce_integration",pluginInactive:s}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Basic settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,t.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude shipping from revenue","gtm-kit"),label:(0,t.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("User Data","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:r,useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("User-Provided Data","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,m.jsx)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Webhooks for server-side tracking","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[l?(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,t.__)("Go to sGTM settings","gtm-kit")})]}):(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,t.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsx)(ke,{title:(0,t.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,t.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Purchase webhook","gtm-kit"),label:(0,t.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:g,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Refund webhook","gtm-kit"),label:(0,t.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:g,useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Event customization","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(fe,{title:"view_item_list (with product filter)",options:[{label:(0,t.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,t.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,t.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"view_item (variable product)",options:[{label:(0,t.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,t.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,t.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,t.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_shipping_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_payment_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Custom CSS Selectors","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,m.jsx)(he,{title:(0,t.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Advanced Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include permalink structure","gtm-kit"),label:(0,t.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include path of pages","gtm-kit"),label:(0,t.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]})]})},Le=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c),a="Contact Form 7",o=!window.gtmkitSettings.plugins.cf7,s=o||!n.integrations.cf7_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Contact Form 7","gtm-kit")),o?(0,u.createElement)(Ce,{pluginName:a}):null,(0,u.createElement)(Ue,{pluginName:a,optionName:"cf7_integration",pluginInactive:o}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(fe,{title:(0,t.__)("Load JavaScript","gtm-kit"),options:[{label:(0,t.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,t.__)("On all pages","gtm-kit"),value:2}],help:(0,t.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:s,useSettings:n,useUpdateStateSettings:i}))))},Me=()=>{const n="Easy Digital Downloads",i=!window.gtmkitSettings.plugins.edd,{useSettings:a,useUpdateStateSettings:o}=(0,e.useContext)(c),s=i||!a.integrations.edd_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Easy Digital Downloads","gtm-kit")),i?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:"edd_integration",pluginInactive:i}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:s}),(0,u.createElement)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:i},(0,u.createElement)(be.Header,{title:(0,t.__)("Advanced settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:s,useSettings:a,useUpdateStateSettings:o}))))},Pe=window.gtmkitSettings.templates||{},Ge=(Object.keys(Pe).map((function(e){const n=Pe[e][0];return{title:n.title,to:n.path,pill:!1,text:[n.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+n.path,text:(0,t.__)("Get template","gtm-kit")}}})),()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Getting Started","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,u.createElement)("p",null,(0,t.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,u.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,t.__)("Read the guide","gtm-kit"))))),(0,u.createElement)(ue,{title:(0,t.__)("Templates","gtm-kit"),data:de("templates")}))),Fe=({title:e,description:n,link:i,templates:a})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:e}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,u.createElement)("div",null,(0,u.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,a&&a.length>0?(0,u.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("GTM container import files:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},a.map((function(t){return(0,u.createElement)("li",null,(0,u.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("Necessary modifications:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm"},a.map((function(t){return(0,u.createElement)("li",null,t.help_text)}))))):null))),He=({sectionData:t})=>{const e=t.collections;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(e).map((function(t){return(0,u.createElement)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates})})))},Be=()=>{const e=at(),n=window.gtmkitSettings.tutorials;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Help","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Need help?","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("We are here to help if you have any questions.","gtm-kit"),(0,u.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,t.__)("See support options","gtm-kit"))))),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Tutorials","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("ul",null,n.map(((t,e)=>(0,u.createElement)("li",{key:e,className:"gtmkit-mb-4"},(0,u.createElement)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map(((t,e)=>(0,u.createElement)("div",{key:e,className:"gtmkit-text-sm"},t))))))))))},We=()=>{const{useIsSending:n,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:s,useSendSystemData:r,useIsSystemDataSent:l,useSystemDataMessage:g,isPremium:u}=(0,e.useContext)(c);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Get support","gtm-kit")}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Support options","gtm-kit")}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[u&&(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,t.__)("WooCommerce Premium Support","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,t.__)("WordPress.org Support Forum","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("GITHub repository","gtm-kit")})}),(0,m.jsxs)("li",{children:[(0,m.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,t.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,m.jsx)(be.Content,{children:l?(0,m.jsx)("p",{className:"gtmkit-mb-2",children:g}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-2",children:(0,t.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")}),(0,m.jsx)(i.TextControl,{label:(0,m.jsxs)("span",{className:"gtmkit-text-red-600",children:[g," "]}),placeholder:(0,t.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:s,onChange:t=>o(t)}),(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r()},disabled:!s.toUpperCase().startsWith("FS"),children:[(0,m.jsx)("span",{children:(0,t.__)("Send system data","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,m.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,t.__)("Version:","gtm-kit")," ",a.gtmkit_version,")"]})}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("p",{children:[(0,t.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,t.__)("The changelog","gtm-kit")}),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("The GitHub repository","gtm-kit")})]})})]})]})};const Ke=t=>{const{Fill:e,Slot:n}=(0,i.createSlotFill)(t),a=({children:t})=>(0,u.createElement)(e,null,t);return a.Slot=({fillProps:t})=>(0,u.createElement)(n,{fillProps:t},(t=>t.length?t:null)),a},ze=Ke("GravityForms"),Ye=(Ke("WooWebhooks"),Ke("WooCustomSelectors"),({integrationID:t,pluginName:n})=>{const{useSettings:i,useUpdateStateSettings:a}=(0,e.useContext)(c),o=!window.gtmkitSettings.plugins[t],s=o||!i.integrations[t+"_integration"];return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),o?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:t+"_integration",pluginInactive:o}),"gf"===t?(0,u.createElement)(ze.Slot,{fillProps:{settingsInactive:s,useSettings:i,useUpdateStateSettings:a}}):null)}),$e=window.wp.plugins,Je=(0,e.forwardRef)((function({icon:t,size:n=24,...i},a){return(0,e.cloneElement)(t,{width:n,height:n,...i,ref:a})})),qe=window.wp.primitives,Ve=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Xe=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ze=n(838),Qe=n.n(Ze);const tn=({title:n,type:a,hideEmpty:o=!0})=>{const{useNotifications:s,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,e.useContext)(c),g=s[a],u=Object.entries(g.active),d=Object.entries(g.dismissed);if(0===g.total&&o)return null;const[p,h]=(0,e.useState)(!1),k=(Object.entries(g.active),Object.entries(g.dismissed),(e,n,a)=>(0,m.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":a},{"gtmkit-border-2":!a}),children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:n.header}),(0,m.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Qe().sanitize(n.message)}})]}),(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(n.id,a?"restore":"dismiss"),children:[(0,m.jsx)("span",{className:"gtmkit-text-sm",children:(0,t.__)(a?"Restore":"Dismiss","gtm-kit")}),l?(0,m.jsx)(i.Spinner,{}):null]})]},e));return(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:n,children:(0,m.jsx)(Ft,{count:g.active.length,important:"problem"===a})}),(0,m.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[u.map((([t,e])=>k(t,e,!1))),d.length>0&&(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,m.jsx)("span",{children:(0,t.sprintf)( +(0,t.__)("Activate the %s integration","gtm-kit"),n),optionGroup:"integrations",optionName:i,disabled:a,useSettings:o,useUpdateStateSettings:s})))},Ae=[{label:(0,t.__)("Retail","gtm-kit"),value:"retail"},{label:(0,t.__)("Education","gtm-kit"),value:"education"},{label:(0,t.__)("Flights","gtm-kit"),value:"flights"},{label:(0,t.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,t.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,t.__)("Local deals","gtm-kit"),value:"local"},{label:(0,t.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,t.__)("Travel","gtm-kit"),value:"travel"},{label:(0,t.__)("Custom","gtm-kit"),value:"custom"}],Ie={variant:{default:"gtmkit-feature-upsell--default",card:"gtmkit-feature-upsell--card"}},Oe=({children:e,shouldUpsell:n=!0,className:a="",variant:o="card",cardLink:s="",cardText:r=(0,t.__)("Unlock with premium","gtm-kit"),...l})=>n?(0,m.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Ie.variant[o],a),children:[(0,m.jsx)("div",{className:"gtmkit-space-y-8 gtmkit-opacity-30",children:e}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Button,{as:"a",className:"gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-lg fgtmkit-font-bold gtmkit-py-6 gtmkit-px-8 is-primary",variant:"upsell",href:s,target:"_blank",rel:"noopener",...l,children:r})})]}):e,Re=()=>{const{useSettings:n,useUpdateStateSettings:i,isPremium:a}=(0,e.useContext)(c),o="WooCommerce",s=!window.gtmkitSettings.plugins.woocommerce,r=s||!n.integrations.woocommerce_integration,l=r||!a||!n.general.sgtm_domain,g=l||!n.premium.woocommerce_webhooks;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("WooCommerce","gtm-kit")}),s?(0,m.jsx)(Ce,{pluginName:o}):null,(0,m.jsx)(Ue,{pluginName:o,optionName:"woocommerce_integration",pluginInactive:s}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Basic settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,t.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude shipping from revenue","gtm-kit"),label:(0,t.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("User Data","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:r,useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("User-Provided Data","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,m.jsx)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,cardLink:"https://jump.gtmkit.com/link/2-30DDC",children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Webhooks for server-side tracking","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[l?(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,t.__)("Go to sGTM settings","gtm-kit")})]}):(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,t.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsx)(ke,{title:(0,t.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,t.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Purchase webhook","gtm-kit"),label:(0,t.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:g,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Refund webhook","gtm-kit"),label:(0,t.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:g,useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Event customization","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(fe,{title:"view_item_list (with product filter)",options:[{label:(0,t.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,t.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,t.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"view_item (variable product)",options:[{label:(0,t.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,t.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,t.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,t.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_shipping_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_payment_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,cardLink:"https://jump.gtmkit.com/link/2-30DDC",children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Custom CSS Selectors","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,m.jsx)(he,{title:(0,t.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Advanced Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include permalink structure","gtm-kit"),label:(0,t.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include path of pages","gtm-kit"),label:(0,t.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]})]})},Le=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c),a="Contact Form 7",o=!window.gtmkitSettings.plugins.cf7,s=o||!n.integrations.cf7_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Contact Form 7","gtm-kit")),o?(0,u.createElement)(Ce,{pluginName:a}):null,(0,u.createElement)(Ue,{pluginName:a,optionName:"cf7_integration",pluginInactive:o}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(fe,{title:(0,t.__)("Load JavaScript","gtm-kit"),options:[{label:(0,t.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,t.__)("On all pages","gtm-kit"),value:2}],help:(0,t.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:s,useSettings:n,useUpdateStateSettings:i}))))},Me=()=>{const n="Easy Digital Downloads",i=!window.gtmkitSettings.plugins.edd,{useSettings:a,useUpdateStateSettings:o}=(0,e.useContext)(c),s=i||!a.integrations.edd_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Easy Digital Downloads","gtm-kit")),i?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:"edd_integration",pluginInactive:i}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:s}),(0,u.createElement)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:i},(0,u.createElement)(be.Header,{title:(0,t.__)("Advanced settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:s,useSettings:a,useUpdateStateSettings:o}))))},Pe=window.gtmkitSettings.templates||{},Ge=(Object.keys(Pe).map((function(e){const n=Pe[e][0];return{title:n.title,to:n.path,pill:!1,text:[n.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+n.path,text:(0,t.__)("Get template","gtm-kit")}}})),()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Getting Started","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,u.createElement)("p",null,(0,t.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,u.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,t.__)("Read the guide","gtm-kit"))))),(0,u.createElement)(ue,{title:(0,t.__)("Templates","gtm-kit"),data:de("templates")}))),Fe=({title:e,description:n,link:i,templates:a})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:e}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,u.createElement)("div",null,(0,u.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,a&&a.length>0?(0,u.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("GTM container import files:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},a.map((function(t){return(0,u.createElement)("li",null,(0,u.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("Necessary modifications:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm"},a.map((function(t){return(0,u.createElement)("li",null,t.help_text)}))))):null))),He=({sectionData:t})=>{const e=t.collections;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(e).map((function(t){return(0,u.createElement)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates})})))},Be=()=>{const e=at(),n=window.gtmkitSettings.tutorials;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Help","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Need help?","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("We are here to help if you have any questions.","gtm-kit"),(0,u.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,t.__)("See support options","gtm-kit"))))),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Tutorials","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("ul",null,n.map(((t,e)=>(0,u.createElement)("li",{key:e,className:"gtmkit-mb-4"},(0,u.createElement)("a",{href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map(((t,e)=>(0,u.createElement)("div",{key:e,className:"gtmkit-text-sm"},t))))))))))},We=()=>{const{useIsSending:n,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:s,useSendSystemData:r,useIsSystemDataSent:l,useSystemDataMessage:g,isPremium:u}=(0,e.useContext)(c);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Get support","gtm-kit")}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Support options","gtm-kit")}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[u&&(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,t.__)("WooCommerce Premium Support","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,t.__)("WordPress.org Support Forum","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("GITHub repository","gtm-kit")})}),(0,m.jsxs)("li",{children:[(0,m.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,t.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,m.jsx)(be.Content,{children:l?(0,m.jsx)("p",{className:"gtmkit-mb-2",children:g}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-2",children:(0,t.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")}),(0,m.jsx)(i.TextControl,{label:(0,m.jsxs)("span",{className:"gtmkit-text-red-600",children:[g," "]}),placeholder:(0,t.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:s,onChange:t=>o(t)}),(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r()},disabled:!s.toUpperCase().startsWith("FS"),children:[(0,m.jsx)("span",{children:(0,t.__)("Send system data","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,m.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,t.__)("Version:","gtm-kit")," ",a.gtmkit_version,")"]})}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("p",{children:[(0,t.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,t.__)("The changelog","gtm-kit")}),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("The GitHub repository","gtm-kit")})]})})]})]})};const Ke=t=>{const{Fill:e,Slot:n}=(0,i.createSlotFill)(t),a=({children:t})=>(0,u.createElement)(e,null,t);return a.Slot=({fillProps:t})=>(0,u.createElement)(n,{fillProps:t},(t=>t.length?t:null)),a},ze=Ke("GravityForms"),Ye=(Ke("WooWebhooks"),Ke("WooCustomSelectors"),({integrationID:t,pluginName:n})=>{const{useSettings:i,useUpdateStateSettings:a}=(0,e.useContext)(c),o=!window.gtmkitSettings.plugins[t],s=o||!i.integrations[t+"_integration"];return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),o?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:t+"_integration",pluginInactive:o}),"gf"===t?(0,u.createElement)(ze.Slot,{fillProps:{settingsInactive:s,useSettings:i,useUpdateStateSettings:a}}):null)}),$e=window.wp.plugins,Je=(0,e.forwardRef)((function({icon:t,size:n=24,...i},a){return(0,e.cloneElement)(t,{width:n,height:n,...i,ref:a})})),qe=window.wp.primitives,Ve=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Xe=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ze=n(838),Qe=n.n(Ze);const tn=({title:n,type:a,hideEmpty:o=!0})=>{const{useNotifications:s,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,e.useContext)(c),g=s[a],u=Object.entries(g.active),d=Object.entries(g.dismissed);if(0===g.total&&o)return null;const[p,h]=(0,e.useState)(!1),k=(Object.entries(g.active),Object.entries(g.dismissed),(e,n,a)=>(0,m.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":a},{"gtmkit-border-2":!a}),children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:n.header}),(0,m.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Qe().sanitize(n.message)}})]}),(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(n.id,a?"restore":"dismiss"),children:[(0,m.jsx)("span",{className:"gtmkit-text-sm",children:(0,t.__)(a?"Restore":"Dismiss","gtm-kit")}),l?(0,m.jsx)(i.Spinner,{}):null]})]},e));return(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:n,children:(0,m.jsx)(Ft,{count:g.active.length,important:"problem"===a})}),(0,m.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[u.map((([t,e])=>k(t,e,!1))),d.length>0&&(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,m.jsx)("span",{children:(0,t.sprintf)( // translators: %d is number %s can be either 'problem' or 'notification'. // translators: %d is number %s can be either 'problem' or 'notification'. (0,t._n)("You have %d hidden %s:","You have %d hidden %ss:",d.length,"gtm-kit"),d.length,a)}),(0,m.jsx)(Je,{icon:p?Ve:Xe,size:48})]}),(0,m.jsx)("div",{className:Mt()("gtmkit-border","gtmkit-border-t-0","gtmkit-mb-4","gtmkit-bg-color-background-disabled",{"gtmkit-hidden":!p}),children:d.map((([t,e])=>k(t,e,!0)))})]}),0===g.total&&(0,m.jsx)("p",{children:(0,t.__)("No notifications at the moment.","gtm-kit")})]})]})},en=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Misc","gtm-kit")}),(0,m.jsx)(tn,{title:(0,t.__)("Problems","gtm-kit"),type:"problem"}),(0,m.jsx)(tn,{title:(0,t.__)("Notifications","gtm-kit"),type:"notice",hideEmpty:!1})]}),nn=({className:t=""})=>(0,m.jsx)(i.Icon,{icon:()=>(0,m.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",className:t,children:(0,m.jsx)("path",{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})}),an=()=>{const{useIsSendingLicenseKey:n}=(0,e.useContext)(c),a=window.gtmkitSettings.opportunities;let o=[];Object.entries(a).length&&(o=Object.entries(a.upgrades));const s=a.plugins||{},r=a.theme||{},l=Object.entries(s),g=!!Object.keys(r).length;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Upgrades","gtm-kit")}),o.map((([e,a])=>(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:a.name}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:a.header}),a.description&&(0,m.jsx)("p",{className:"gtmkit-mb-4",children:a.description}),a.usp.length>0&&(0,m.jsx)("ul",{className:"gtmkit-text-sm gtmkit-mb-8",children:a.usp.map((t=>(0,m.jsxs)("li",{className:"gtmkit-flex gtmkit-items-center",children:[(0,m.jsx)(nn,{})," ",t]})))}),(l.length>0||g)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:(0,t.__)("Enhanced Compatibility","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-6",children:(0,t.__)("Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:","gtm-kit")})]}),g&&(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,m.jsxs)("span",{className:"gtmkit-font-bold",children:[r.name,":"]})," ",(0,t.__)("Your theme is supported with enhanced compatibility.","gtm-kit")," ",r.description]}),l.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h3",{className:"gtmkit-font-bold gtmkit-text-sm gtmkit-mb-4",children:(0,t.__)("Enhanced Plugin Support:","gtm-kit")}),(0,m.jsx)("ul",{className:"gtmkit-text-sm",children:l.map((([t,e])=>(0,m.jsxs)("li",{className:"gtmkit-mb-4",children:[e.name," - ",e.description]},t)))})]}),a.url&&(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base gtmkit-mt-4",onClick:()=>{window.location.href=a.url},children:[(0,m.jsx)("span",{children:a.button_text||(0,t.__)("Learn More","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})]},e)))]})},on={integrations:(0,t.__)("Integrations","gtm-kit"),templates:(0,t.__)("Google Tag Manager Templates","gtm-kit"),help:(0,t.__)("Help","gtm-kit")},sn=()=>{const{useSettings:n}=(0,e.useContext)(c),a=window.gtmkitSettings,o=a.currentPage,s=function({page:e}){switch(e){case"general":return[{to:"general",title:(0,t.__)("Dashboard","gtm-kit")},{to:"container",title:(0,t.__)("Container","gtm-kit")},{to:"post-data",title:(0,t.__)("Post data","gtm-kit")},{to:"user-data",title:(0,t.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,t.__)("Google Consent Mode","gtm-kit")},{to:"notifications",title:(0,t.__)("Notifications","gtm-kit")},{to:"misc",title:(0,t.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,t.__)("Integrations","gtm-kit")},...de("integrations")];case"upgrades":return[{to:"upgrades",title:(0,t.__)("Upgrades","gtm-kit")}];case"templates":return[{to:"templates",title:(0,t.__)("Templates","gtm-kit")},...de("templates")];case"help":return[{to:"help",title:(0,t.__)("Help","gtm-kit")},{to:"support",title:(0,t.__)("Support","gtm-kit")}]}}({page:o}),r=a.templates,l=a.integrations,g=on[o]||(0,t.__)("Settings","gtm-kit");return Object.keys(n).length?(0,m.jsxs)(i.SlotFillProvider,{children:[(0,m.jsx)(Rt,{title:g}),(0,m.jsx)(Bt,{NavList:s}),(0,m.jsx)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base",children:(0,m.jsxs)(_t,{children:[(0,m.jsx)(kt,{exact:!0,path:"/general",element:(0,m.jsx)(pe,{})}),(0,m.jsx)(kt,{exact:!0,path:"/container",element:(0,m.jsx)(Se,{})}),(0,m.jsx)(kt,{exact:!0,path:"/post-data",element:(0,m.jsx)(ye,{})}),(0,m.jsx)(kt,{exact:!0,path:"/user-data",element:(0,m.jsx)(ve,{})}),(0,m.jsx)(kt,{exact:!0,path:"/google-consent-mode",element:(0,m.jsx)(Ee,{})}),(0,m.jsx)(kt,{exact:!0,path:"/notifications",element:(0,m.jsx)(en,{})}),(0,m.jsx)(kt,{exact:!0,path:"/misc",element:(0,m.jsx)(je,{})}),(0,m.jsx)(kt,{exact:!0,path:"/integrations",element:(0,m.jsx)(Te,{})}),(0,m.jsx)(kt,{exact:!0,path:"/woocommerce",element:(0,m.jsx)(Re,{})}),(0,m.jsx)(kt,{exact:!0,path:"/cf7",element:(0,m.jsx)(Le,{})}),(0,m.jsx)(kt,{exact:!0,path:"/edd",element:(0,m.jsx)(Me,{})}),l&&Object.keys(l).map((function(t){if("add-on"===l[t].type)return(0,m.jsx)(kt,{exact:!0,path:t,element:(0,m.jsx)(Ye,{integrationID:t,pluginName:l[t].title})},t)})),(0,m.jsx)(kt,{exact:!0,path:"/upgrades",element:(0,m.jsx)(an,{})}),(0,m.jsx)(kt,{exact:!0,path:"/templates",element:(0,m.jsx)(Ge,{})}),r&&Object.keys(r).map((function(t){return(0,m.jsx)(kt,{exact:!0,path:t,element:(0,m.jsx)(He,{sectionData:r[t][0]})},t)})),(0,m.jsx)(kt,{exact:!0,path:"/help",element:(0,m.jsx)(Be,{})}),(0,m.jsx)(kt,{exact:!0,path:"/support",element:(0,m.jsx)(We,{})}),(0,m.jsx)(kt,{path:"/",element:(0,m.jsx)(ht,{replace:!0,to:"/"+o})})]})}),(0,m.jsx)(le,{}),(0,m.jsx)($e.PluginArea,{})]}):(0,m.jsx)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Spinner,{})})},rn=()=>(0,m.jsx)(Tt,{basename:"/",children:(0,m.jsx)(g,{children:(0,m.jsx)(sn,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.render)((0,m.jsx)(rn,{}),t)}))})()})(); \ No newline at end of file