"use strict";(globalThis.webpackChunkgtm_kit_settings=globalThis.webpackChunkgtm_kit_settings||[]).push([[837],{9837:(t,e,i)=>{i.r(e),i.d(e,{default:()=>c});var a=i(6087),s=i(7723),o=i(6427),n=i(7767),m=i(3951);var l=i(282);var g=i(790);const r=(0,a.memo)((({title:t,label:e,optionGroup:i="general",optionName:s,disabled:n=!1,narrow:r=!1,premium:c=!1,notificationId:d=""})=>{const u=(0,a.useId)(),[k,p]=((t,e)=>{const{settings:i,updateStateSettings:s}=(0,a.useContext)(m.ph),o=i?.[t]?.[e];return[o,(0,a.useCallback)((i=>{s(t,e,i)}),[t,e,s])]})(i,s),{removeNotification:x}=(()=>{var t,e;const{notifications:i,setNotificationStatus:s,isUpdatingNotifications:o}=(0,a.useContext)(l.V2),n=(0,a.useCallback)((t=>s(t,"dismiss")),[s]),m=(0,a.useCallback)((t=>s(t,"remove")),[s]),g=null!==(t=i?.metrics?.total)&&void 0!==t?t:0,r=null!==(e=i?.metrics?.problem)&&void 0!==e?e:0;return{notifications:i,dismissNotification:n,removeNotification:m,isUpdatingNotifications:o,totalNotifications:g,problemNotifications:r,hasProblems:r>0,hasNotifications:g>0}})(),h="gtmkit-settings-field-wrap "+(r?"gtmkit-py-2":"gtmkit-py-4");return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:h,children:(0,g.jsx)(o.BaseControl,{label:c?(0,g.jsxs)(g.Fragment,{children:[t,(0,g.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:u,children:(0,g.jsx)(o.ToggleControl,{label:e,checked:!n&&Boolean(k),onChange:()=>{p(!Boolean(k)),d&&x(d)},disabled:n})})})})})),c=()=>{const{useSettings:t,updateStateSettings:e,updateSettings:i,isPending:l}=(0,a.useContext)(m.ph),c=(0,n.Zp)();return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,s.__)("Automatic Updates","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey",children:(0,s.__)("New releases of GTM Kit may contain important updates to comply with changes in Google Tag Manager or analytics in general. We recommend enabling automatic plugin updates for GTM Kit to ensure it is always up to date.","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey",children:(0,s.__)("You can, of course, manually update GTM Kit whenever it suits you, but we highly recommend that you regularly update your plugins and themes to the latest versions to keep your site secure.","gtm-kit")}),(0,g.jsx)("div",{className:"gtmkit-max-w-max gtmkit-mx-auto gtmkit-mt-12",children:(0,g.jsx)(r,{title:(0,s.__)("Enable Automatic Updates","gtm-kit"),label:(0,s.__)("Automatically update the GTM Kit plugin when new releases are available.","gtm-kit"),optionGroup:"misc",optionName:"auto_update",useSettings:t,updateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,g.jsxs)(o.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),c("/getting-started",{replace:!0})},disabled:l,children:[(0,s.__)("Save and continue","gtm-kit"),l?(0,g.jsx)(o.Spinner,{}):""]})})]})}}}]);