"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/dns/records/dns-zone-sync"],{947:(e,n,s)=>{s.r(n),s.d(n,{default:()=>a});var t=s(254),o=s(256),u=s.n(o),l=s(255);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},1733:(e,n,s)=>{s.r(n),s.d(n,{default:()=>y});var t=s(462),o=s(763),u=s(255),l=s(727),c=s(759),a=s(947),r=s(915),i=s(102),p=s(254);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?9a18ee0dea9b3751eb1c