"use strict";(globalThis.webpackChunkgtm_kit_settings=globalThis.webpackChunkgtm_kit_settings||[]).push([[345],{6327:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(6427),s=i(6087),a=i(5280),o=i(790);const l=(0,s.memo)((({title:t,options:e,help:i,className:s="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:r,disabled:m})=>{const[g,c]=(0,a.G)(l,r);return(0,o.jsx)(n.RadioControl,{label:t,options:e,help:i,className:s,selected:parseInt(g),onChange:c,disabled:m})}))},6992:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(6427),s=i(6087),a=i(5280),o=i(1835),l=i(790);const r=(0,s.memo)((({title:t,label:e,optionGroup:i="general",optionName:r,disabled:m=!1,narrow:g=!1,premium:c=!1,notificationId:d=""})=>{const p=(0,s.useId)(),[k,u]=(0,a.G)(i,r),{removeNotification:h}=(0,o.h)(),x="gtmkit-settings-field-wrap "+(g?"gtmkit-py-2":"gtmkit-py-4");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:x,children:(0,l.jsx)(n.BaseControl,{label:c?(0,l.jsxs)(l.Fragment,{children:[t,(0,l.jsx)("span",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-normal gtmkit-rounded-full gtmkit-py-0.5 gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"})]}):t,id:p,children:(0,l.jsx)(n.ToggleControl,{label:e,checked:!m&&Boolean(k),onChange:()=>{u(!Boolean(k)),d&&h(d)},disabled:m})})})})}))},4901:(t,e,i)=>{i.d(e,{A:()=>m});var n=i(7723),s=i(6992),a=i(237),o=i(6087),l=i(3951),r=i(790);const m=(0,o.memo)((({pluginName:t,optionName:e,pluginInactive:i})=>{const{useSettings:m,updateStateSettings:g}=(0,o.useContext)(l.ph);return(0,r.jsxs)(a.A,{disabled:i,children:[(0,r.jsx)(a.A.Header,{title:(0,n.sprintf)(
// translators: %s is the name of the plugin.
// translators: %s is the name of the plugin.
(0,n.__)("%s Integration","gtm-kit"),t)}),(0,r.jsx)(a.A.Content,{children:(0,r.jsx)(s.A,{title:(0,n.sprintf)(
// translators: %s is the name of the plugin.
// translators: %s is the name of the plugin.
(0,n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(
// translators: %s is the name of the plugin.
// translators: %s is the name of the plugin.
(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:m,updateStateSettings:g})})]})}))},8949:(t,e,i)=>{i.d(e,{A:()=>m});var n=i(7723),s=i(6087),a=i(6427),o=i(237),l=i(8621),r=i(790);const m=(0,s.memo)((({pluginName:t})=>(0,r.jsxs)(o.A,{children:[(0,r.jsx)(o.A.Header,{title:(0,n.sprintf)(
// translators: %s is the name of the plugin.
// translators: %s is the name of the plugin.
(0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,r.jsxs)(o.A.Content,{children:[(0,r.jsx)("p",{className:"gtmkit-mb-6",children:(0,n.sprintf)(
// translators: %s is the name of the plugin.
// translators: %s is the name of the plugin.
(0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)}),(0,r.jsx)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=l.A.getPluginInstallUrl()+t},children:(0,n.sprintf)(
// translators: %s is the name of the plugin.
// translators: %s is the name of the plugin.
(0,n.__)("Install %s","gtm-kit"),t)})]})]})))},237:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(6087),s=i(790);const a=(0,n.memo)((({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,s.jsxs)(t,{...a,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+n,children:[e,i]}))),o=(0,n.memo)((({as:t="div",children:e,className:i="",...n})=>(0,s.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e}))),l=(0,n.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,s.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));l.Header=a,l.Content=o;const r=l},3345:(t,e,i)=>{i.r(e),i.d(e,{default:()=>g});var n=i(7723),s=i(9566),a=i(8949),o=i(6327),l=i(4901),r=i(237),m=i(790);const g=()=>{const t="Contact Form 7",{pluginInactive:e,settingsInactive:i}=(0,s.q)("cf7","cf7_integration");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,n.__)("Contact Form 7","gtm-kit")}),e?(0,m.jsx)(a.A,{pluginName:t}):null,(0,m.jsx)(l.A,{pluginName:t,optionName:"cf7_integration",pluginInactive:e}),(0,m.jsxs)(r.A,{disabled:i,children:[(0,m.jsx)(r.A.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,m.jsx)(r.A.Content,{children:(0,m.jsx)(o.A,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:i})})]})]})}},9566:(t,e,i)=>{i.d(e,{q:()=>l});var n=i(6087),s=i(3951),a=i(9132),o=i(8621);const l=(t,e)=>{const{settings:i}=(0,n.useContext)(s.ph),{isPremium:l,hasValidLicense:r}=(0,n.useContext)(a.BN);return(0,n.useMemo)((()=>{const n=!o.A.isPluginActive(t),s="1"===i?.integrations?.[e]||!0===i?.integrations?.[e],a=n||!s,m=a||!(l&&r),g=m||!(i?.general?.sgtm_domain&&i.general.sgtm_domain.trim());return{pluginActive:!n,pluginInactive:n,integrationEnabled:s,settingsInactive:a,premiumActive:!m,premiumInactive:m,sgtmActive:!g,sgtmInactive:g,canUseIntegration:!a,canUsePremiumFeatures:!m,canUseSgtmFeatures:!g}}),[t,e,i?.integrations,i?.general?.sgtm_domain,l,r])}},1835:(t,e,i)=>{i.d(e,{h:()=>a});var n=i(6087),s=i(282);const a=()=>{var t,e;const{notifications:i,setNotificationStatus:a,isUpdatingNotifications:o}=(0,n.useContext)(s.V2),l=(0,n.useCallback)((t=>a(t,"dismiss")),[a]),r=(0,n.useCallback)((t=>a(t,"remove")),[a]),m=null!==(t=i?.metrics?.total)&&void 0!==t?t:0,g=null!==(e=i?.metrics?.problem)&&void 0!==e?e:0;return{notifications:i,dismissNotification:l,removeNotification:r,isUpdatingNotifications:o,totalNotifications:m,problemNotifications:g,hasProblems:g>0,hasNotifications:m>0}}},5280:(t,e,i)=>{i.d(e,{G:()=>a});var n=i(6087),s=i(3951);const a=(t,e)=>{const{settings:i,updateStateSettings:a}=(0,n.useContext)(s.ph),o=i?.[t]?.[e];return[o,(0,n.useCallback)((i=>{a(t,e,i)}),[t,e,a])]}}}]);