"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/smb/dns-zone/acl-records"],{1555:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(667),i=s.n(r),a=s(90),d=s(1556);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},1556:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(295),i=s(90);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})}},1559:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(667),i=s.n(r),a=s(296),d=s(90),n=s(717),o=s(295);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},2337:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r.default});var r=s(2338)},2338:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(667),i=s.n(r),a=s(1559),d=s(674),n=s(2339),o=s(295);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)},2339:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var r=s(295),i=s(667),a=s.n(i),d=s(296),n=s(90),o=s(1555),l=s(717);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}}]);
//# sourceMappingURL=acl-records.js.map?3a37be781d7992ad2d22