"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/dns/records/dns-zone-sync"],{953:(e,n,s)=>{s.r(n),s.d(n,{default:()=>a});var t=s(242),o=s(244),u=s.n(o),l=s(243);const c=({onClose:e,isOpen:n,...s})=>{const[o,u]=(0,t.useState)(n),c=(0,t.useRef)(null),a=(0,t.useMemo)((()=>e?(...n)=>{u(!1),c.current=setTimeout((()=>{e(...n),c.current=null}),300)}:e),[e]);return(0,t.useEffect)((()=>()=>clearTimeout(c.current)),[]),(0,t.useEffect)((()=>{c.current&&clearTimeout(c.current)}),[n]),(0,t.jsx)(l.Drawer,{...s,onClose:a,isOpen:o})};c.propTypes={onClose:u().func,isOpen:u().bool},c.defaultProps={onClose:null,isOpen:!0};const a=c},1735:(e,n,s)=>{s.r(n),s.d(n,{default:()=>y});var t=s(453),o=s(759),u=s(243),l=s(724),c=s(755),a=s(953),r=s(920),i=s(90),p=s(242);const d=i.Locale.getTranslate("admin.controllers.dns.sync"),f=t.gql`
    mutation SyncDnsZone($input: SyncDnsZoneInput!) {
        syncDnsZone(input: $input) {
            task {
                id
            }
        }
    }
`,y=()=>{const e=(0,l.useNavigate)(),[n]=(0,o.useMutation)(f),s=()=>e("..");return(0,p.jsx)(a.default,{component:c.default,dataType:"dns-zone-sync",isOpen:!0,onClose:s,title:(0,p.jsx)(d,{content:"title"}),form:(0,p.jsx)(r.default,{applyButton:!1,mutation:n,onSubmit:({sync:e})=>({forced:"forced"===e}),onSuccess:s,submitButton:{"data-type":"dns-sync-apply"},values:{sync:"safe"},children:(0,p.jsx)(u.FormFieldRadioButtons,{label:(0,p.jsx)(d,{content:"type-option"}),name:"sync",options:[{value:"safe",label:(0,p.jsx)(d,{content:"safe"})},{value:"forced",label:(0,p.jsx)(d,{content:"force"})}]})})})}}}]);
//# sourceMappingURL=dns-zone-sync.js.map?a8364a8ed1554c135886