"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/dns/acl-records"],{879:(e,t,a)=>{a.r(t);var r=a(210),s=a.n(r),i=a(88),d=a(880);const n={id:s().string,dataUrl:s().string,operations:s().array,itemActions:s().object,columns:s().array,data:s().shape({data:s().array,state:s().object,pager:s().object,locale:s().object,additional:s().object,pathbar:s().any}),searchFilters:s().object,searchOveral:s().string,disabledSelectHint:s().string,isDisabledItem:s().func,onRedraw:s().func,emptyViewMode:s().oneOf(["all","items"]),emptyView:s().any},l={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},o=(0,d.default)(i.List,Object.keys(n));o.displayName="JswList",o.propTypes=n,o.defaultProps=l,t.default=o},883:(e,t,a)=>{a.r(t);var r=a(210),s=a.n(r),i=a(209),d=a(88),n=a(489),l=a(208);const o=({items:e})=>e&&e.length>1?(0,l.jsx)(i.Tabs,{active:e.findIndex((({containerCls:e})=>"active"===e))+1,children:e.map((({title:e,href:t},a)=>(0,l.jsx)(i.Tab,{title:e,component:n.default,to:(0,d.prepareUrl)(t)},a)))}):null;o.propTypes={items:s().arrayOf(s().shape({title:s().string.isRequired,href:s().string.isRequired,containerCls:s().string}))},o.defaultProps={items:void 0},t.default=o},880:(e,t,a)=>{a.r(t);var r=a(208),s=a(88);t.default=(e,t=[],a={})=>i=>{const d=(0,r.useRef)(),n=(0,r.useRef)(),[l,o]=Object.entries(i).reduce(((e,[a,r])=>(e[t.includes(a)?0:1][a]=r,e)),[{},{}]),c=t.map((e=>{const t=l[e];return a[e]?(n.current?.[a[e]](t),null):t}));return(0,r.useLayoutEffect)((()=>(n.current=new e(l),(0,s.render)(d.current,n.current),()=>{n.current.remove(),n.current=null})),[o.key,...c]),(0,r.jsx)("div",{ref:d,...o})}},1208:(e,t,a)=>{a.r(t);var r=a(208),s=a(209),i=a(879),d=a(489),n=a(88);const l=n.Locale.getSection("admin.components.lists.dnsaclrecords"),o=({data:e,searchFilters:t})=>{const a=(0,d.useNavigateCallback)(),o=(0,r.useMemo)((()=>[n.list.COLUMN_SELECTION,{header:l.lmsg("value"),sortable:!0,dataIndex:"value"}]),[]),c=(0,r.useMemo)((()=>[{componentType:n.SmallButton,id:"buttonAddRecord",title:l.lmsg("add"),addCls:"sb-add-new btn-primary",href:"/admin/dns/add-acl-record",handler:a},{componentType:n.SmallButton,id:"buttonRemoveRecord",title:l.lmsg("remove"),description:l.lmsg("hintRemove"),addCls:"sb-remove-selected",handler(e){(0,n.getComponent)("dns-template-acl-records").execGroupOperation({url:"/admin/dns/delete-acl-record",subtype:n.messageBox.SUBTYPE_DELETE,mouseEvent:e,locale:{confirmOnGroupOperation:l.lmsg("confirmOnDelete")}})}}]),[a]),p=(0,r.useMemo)((()=>(0,r.jsx)(s.ListEmptyView,{title:l.lmsg("emptyViewTitle"),description:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:l.lmsg("emptyViewDescription1")}),(0,r.jsx)("p",{children:l.lmsg("emptyViewDescription2")})]}),actions:(0,r.jsx)(s.Button,{id:"buttonAddRecord",intent:"primary",component:"a",href:"/admin/dns/add-acl-record",onClick:a,children:l.lmsg("add")})})),[a]);return(0,r.jsx)(i.default,{id:"dns-template-acl-records",data:e,dataUrl:"/admin/dns/acl-records-data",searchOveral:"value",searchFilters:t,columns:o,operations:c,emptyViewMode:"all",emptyView:p})};o.propTypes={data:i.default.propTypes.data.isRequired,searchFilters:i.default.propTypes.searchFilters.isRequired},t.default=o},1207:(e,t,a)=>{a.r(t);var r=a(210),s=a.n(r),i=a(883),d=a(748),n=a(1208),l=a(208);const o=({tabs:e,aclRecordsList:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.default,{items:e}),(0,l.jsx)(n.default,{...t})]});o.propTypes={tabs:i.default.propTypes.items.isRequired,aclRecordsList:s().object.isRequired},t.default=(0,d.withPageLayout)(o)},1206:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r.default});var r=a(1207)}}]);
//# sourceMappingURL=acl-records.js.map?166bdf792f3408f28606