"use strict";(globalThis.webpackChunkgtm_kit=globalThis.webpackChunkgtm_kit||[]).push([[896],{896(t,e,i){i.r(e),i.d(e,{default:()=>c});var a=i(87),s=i(723),o=i(427),n=i(767),m=i(294);var l=i(988);var r=i(790);const g=(0,a.memo)((({title:t,label:e,optionGroup:i="general",optionName:s,disabled:n=!1,narrow:g=!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]),r=(0,a.useCallback)((t=>s(t,"restore")),[s]),g=null!==(t=i?.metrics?.total)&&void 0!==t?t:0,c=null!==(e=i?.metrics?.problem)&&void 0!==e?e:0;return{notifications:i,dismissNotification:n,removeNotification:m,restoreNotification:r,isUpdatingNotifications:o,totalNotifications:g,problemNotifications:c,hasProblems:c>0,hasNotifications:g>0}})(),h="gtmkit-settings-field-wrap "+(g?"gtmkit-py-2":"gtmkit-py-4");return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:h,children:(0,r.jsx)(o.BaseControl,{label:c?(0,r.jsxs)(r.Fragment,{children:[t,(0,r.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,r.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,r.jsxs)(r.Fragment,{children:[(0,r.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,r.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,r.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,r.jsx)("div",{className:"gtmkit-max-w-max gtmkit-mx-auto gtmkit-mt-12",children:(0,r.jsx)(g,{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,r.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,r.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,r.jsx)(o.Spinner,{}):""]})})]})}}}]);