"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/dns/records/dns-zone-sync"],{1696:(e,n,s)=>{s.r(n),s.d(n,{default:()=>y});var t=s(447),o=s(748),u=s(242),l=s(719),c=s(744),a=s(910),r=s(877),i=s(90),p=s(241);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"})}]})})})}},910:(e,n,s)=>{s.r(n),s.d(n,{default:()=>a});var t=s(241),o=s(243),u=s.n(o),l=s(242);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}}]);
//# sourceMappingURL=dns-zone-sync.js.map?5c2f62cdb91fefcbe7cf