"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/smb/dns-zone/acl-records"],{1537:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(591),i=s.n(r),a=s(89),d=s(1538);const n={id:i().string,dataUrl:i().string,operations:i().array,itemActions:i().object,columns:i().array,data:i().shape({data:i().array,state:i().object,pager:i().object,locale:i().object,additional:i().object,pathbar:i().any}),searchFilters:i().object,searchOveral:i().string,disabledSelectHint:i().string,isDisabledItem:i().func,onRedraw:i().func,emptyViewMode:i().oneOf(["all","items"]),emptyView:i().any},o={id:void 0,dataUrl:void 0,operations:void 0,itemActions:void 0,columns:void 0,data:void 0,searchFilters:void 0,searchOveral:void 0,disabledSelectHint:void 0,isDisabledItem:void 0,onRedraw:void 0,emptyViewMode:void 0,emptyView:void 0},l=(0,d.default)(a.List,{propsList:Object.keys(n),defaultProps:o});l.displayName="JswList",l.propTypes=n;const c=l},1541:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(591),i=s.n(r),a=s(286),d=s(89),n=s(641),o=s(285);const l=({items:e})=>e&&e.length>1?(0,o.jsx)(a.Tabs,{active:e.findIndex((({containerCls:e})=>"active"===e))+1,children:e.map((({title:e,href:t},s)=>(0,o.jsx)(a.Tab,{title:e,component:n.default,to:(0,d.prepareUrl)(t)},s)))}):null;l.propTypes={items:i().arrayOf(i().shape({title:i().string.isRequired,href:i().string.isRequired,containerCls:i().string}))};const c=l},1538:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(285),i=s(89);const a=(e,{propsList:t=[],setters:s={},defaultProps:a={}})=>d=>{const n=(0,r.useRef)(),o=(0,r.useRef)(),[l,c]=Object.entries({...a,...d}).reduce(((e,[s,r])=>(e[t.includes(s)?0:1][s]=r,e)),[{},{}]),p=t.map((e=>{const t=l[e];return s[e]?(o.current?.[s[e]](t),null):t}));return(0,r.useLayoutEffect)((()=>(o.current=new e(l),(0,i.render)(n.current,o.current),()=>{o.current.remove(),o.current=null})),[c.key,...p]),(0,r.jsx)("div",{ref:n,...c})}},2317:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var r=s(285),i=s(591),a=s.n(i),d=s(286),n=s(89),o=s(1537),l=s(641);const c=n.Locale.getSection("smb.components.lists.dnsaclrecords"),p=({owner:e,data:t,searchFilters:s})=>{const i=(0,l.useNavigateCallback)(),a=(0,r.useMemo)((()=>[n.list.COLUMN_SELECTION,{header:c.lmsg("value"),sortable:!0,dataIndex:"value"}]),[]),p=(0,r.useMemo)((()=>[{componentType:n.SmallButton,id:"buttonAddRecord",title:c.lmsg("add"),addCls:"sb-add-new btn-primary",href:`/smb/dns-zone/add-acl-record/id/${e.id}/type/${e.type}`,handler:i},{componentType:n.SmallButton,id:"buttonRemoveRecord",title:c.lmsg("remove"),description:c.lmsg("hintRemove"),addCls:"sb-remove-selected",handler(t){(0,n.getComponent)("dns-zone-acl-records").execGroupOperation({url:`/smb/dns-zone/delete-acl-record/id/${e.id}/type/${e.type}`,subtype:n.messageBox.SUBTYPE_DELETE,mouseEvent:t,locale:{confirmOnGroupOperation:c.lmsg("confirmOnDelete")}})}}]),[i,e]),u=(0,r.useMemo)((()=>(0,r.jsx)(d.ListEmptyView,{title:c.lmsg("emptyViewTitle"),description:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:c.lmsg("emptyViewDescription1")}),(0,r.jsx)("p",{children:c.lmsg("emptyViewDescription2")})]}),actions:(0,r.jsx)(d.Button,{id:"buttonAddRecord",intent:"primary",component:"a",href:`/smb/dns-zone/add-acl-record/id/${e.id}/type/${e.type}`,onClick:i,children:c.lmsg("add")})})),[i,e]);return(0,r.jsx)(o.default,{id:"dns-zone-acl-records",data:t,dataUrl:`/smb/dns-zone/acl-records-data/id/${e.id}/type/${e.type}`,searchOveral:"value",searchFilters:s,columns:a,operations:p,emptyViewMode:"all",emptyView:u})};p.propTypes={owner:a().shape({id:a().string.isRequired,type:a().string.isRequired}).isRequired,data:o.default.propTypes.data.isRequired,searchFilters:o.default.propTypes.searchFilters.isRequired};const u=p},2316:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(591),i=s.n(r),a=s(1541),d=s(598),n=s(2317),o=s(285);const l=({params:{id:e,type:t},tabs:s,aclRecordsList:r})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.default,{items:s}),(0,o.jsx)(n.default,{owner:{id:e,type:t},...r})]});l.propTypes={params:i().shape({id:i().string.isRequired,type:i().oneOf(["domain","alias"]).isRequired}).isRequired,tabs:a.default.propTypes.items.isRequired,aclRecordsList:i().object.isRequired};const c=(0,d.withPageLayout)(l)},2315:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r.default});var r=s(2316)}}]);
//# sourceMappingURL=acl-records.js.map?18396acf9e32d87b7a67