"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/smb/dns-zone/acl-records"],{993:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(244),i=s.n(r),a=s(90),d=s(994);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,Object.keys(n));l.displayName="JswList",l.propTypes=n,l.defaultProps=o;const c=l},997:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(244),i=s.n(r),a=s(243),d=s(90),n=s(772),o=s(242);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}))},l.defaultProps={items:void 0};const c=l},994:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var r=s(242),i=s(90);const a=(e,t=[],s={})=>a=>{const d=(0,r.useRef)(),n=(0,r.useRef)(),[o,l]=Object.entries(a).reduce(((e,[s,r])=>(e[t.includes(s)?0:1][s]=r,e)),[{},{}]),c=t.map((e=>{const t=o[e];return s[e]?(n.current?.[s[e]](t),null):t}));return(0,r.useLayoutEffect)((()=>(n.current=new e(o),(0,i.render)(d.current,n.current),()=>{n.current.remove(),n.current=null})),[l.key,...c]),(0,r.jsx)("div",{ref:d,...l})}},1766:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var r=s(242),i=s(244),a=s.n(i),d=s(243),n=s(90),o=s(993),l=s(772);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},1765:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(244),i=s.n(r),a=s(997),d=s(736),n=s(1766),o=s(242);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)},1764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r.default});var r=s(1765)}}]);
//# sourceMappingURL=acl-records.js.map?e4852affb3f5d160a7d5