"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/dns/acl-records"],{1537:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(591),a=s.n(r),d=s(89),i=s(1538);const n={id:a().string,dataUrl:a().string,operations:a().array,itemActions:a().object,columns:a().array,data:a().shape({data:a().array,state:a().object,pager:a().object,locale:a().object,additional:a().object,pathbar:a().any}),searchFilters:a().object,searchOveral:a().string,disabledSelectHint:a().string,isDisabledItem:a().func,onRedraw:a().func,emptyViewMode:a().oneOf(["all","items"]),emptyView:a().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,i.default)(d.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),a=s.n(r),d=s(286),i=s(89),n=s(641),o=s(285);const l=({items:e})=>e&&e.length>1?(0,o.jsx)(d.Tabs,{active:e.findIndex((({containerCls:e})=>"active"===e))+1,children:e.map((({title:e,href:t},s)=>(0,o.jsx)(d.Tab,{title:e,component:n.default,to:(0,i.prepareUrl)(t)},s)))}):null;l.propTypes={items:a().arrayOf(a().shape({title:a().string.isRequired,href:a().string.isRequired,containerCls:a().string}))};const c=l},1538:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d});var r=s(285),a=s(89);const d=(e,{propsList:t=[],setters:s={},defaultProps:d={}})=>i=>{const n=(0,r.useRef)(),o=(0,r.useRef)(),[l,c]=Object.entries({...d,...i}).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,a.render)(n.current,o.current),()=>{o.current.remove(),o.current=null})),[c.key,...p]),(0,r.jsx)("div",{ref:n,...c})}},2293:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(285),a=s(286),d=s(1537),i=s(641),n=s(89);const o=n.Locale.getSection("admin.components.lists.dnsaclrecords"),l=({data:e,searchFilters:t})=>{const s=(0,i.useNavigateCallback)(),l=(0,r.useMemo)((()=>[n.list.COLUMN_SELECTION,{header:o.lmsg("value"),sortable:!0,dataIndex:"value"}]),[]),c=(0,r.useMemo)((()=>[{componentType:n.SmallButton,id:"buttonAddRecord",title:o.lmsg("add"),addCls:"sb-add-new btn-primary",href:"/admin/dns/add-acl-record",handler:s},{componentType:n.SmallButton,id:"buttonRemoveRecord",title:o.lmsg("remove"),description:o.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:o.lmsg("confirmOnDelete")}})}}]),[s]),p=(0,r.useMemo)((()=>(0,r.jsx)(a.ListEmptyView,{title:o.lmsg("emptyViewTitle"),description:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:o.lmsg("emptyViewDescription1")}),(0,r.jsx)("p",{children:o.lmsg("emptyViewDescription2")})]}),actions:(0,r.jsx)(a.Button,{id:"buttonAddRecord",intent:"primary",component:"a",href:"/admin/dns/add-acl-record",onClick:s,children:o.lmsg("add")})})),[s]);return(0,r.jsx)(d.default,{id:"dns-template-acl-records",data:e,dataUrl:"/admin/dns/acl-records-data",searchOveral:"value",searchFilters:t,columns:l,operations:c,emptyViewMode:"all",emptyView:p})};l.propTypes={data:d.default.propTypes.data.isRequired,searchFilters:d.default.propTypes.searchFilters.isRequired};const c=l},2292:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var r=s(591),a=s.n(r),d=s(1541),i=s(598),n=s(2293),o=s(285);const l=({tabs:e,aclRecordsList:t})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.default,{items:e.filter(Boolean)}),(0,o.jsx)(n.default,{...t})]});l.propTypes={tabs:d.default.propTypes.items.isRequired,aclRecordsList:a().object.isRequired};const c=(0,i.withPageLayout)(l)},2291:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r.default});var r=s(2292)}}]);
//# sourceMappingURL=acl-records.js.map?ffddcd213b3dd63e9ff4