"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["views/admin/dns/acl-records"],{1668(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(763),r=s.n(a),d=s(95),i=s(1669);const n={id:r().string,dataUrl:r().string,operations:r().array,itemActions:r().object,columns:r().array,data:r().shape({data:r().array,state:r().object,pager:r().object,locale:r().object,additional:r().object,pathbar:r().any}),searchFilters:r().object,searchOveral:r().string,disabledSelectHint:r().string,isDisabledItem:r().func,onRedraw:r().func,emptyViewMode:r().oneOf(["all","items"]),emptyView:r().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},1672(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(763),r=s.n(a),d=s(379),i=s(95),n=s(808),o=s(378);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:r().arrayOf(r().shape({title:r().string.isRequired,href:r().string.isRequired,containerCls:r().string}))};const c=l},1669(e,t,s){s.r(t),s.d(t,{default:()=>d});var a=s(378),r=s(95);const d=(e,{propsList:t=[],setters:s={},defaultProps:d={}})=>i=>{const n=(0,a.useRef)(),o=(0,a.useRef)(),[l,c]=Object.entries({...d,...i}).reduce((e,[s,a])=>(e[t.includes(s)?0:1][s]=a,e),[{},{}]),p=t.map(e=>{const t=l[e];return s[e]?(o.current?.[s[e]](t),null):t});return(0,a.useLayoutEffect)(()=>(o.current=new e(l),(0,r.render)(n.current,o.current),()=>{o.current.remove(),o.current=null}),[c.key,...p]),(0,a.jsx)("div",{ref:n,...c})}},2490(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(378),r=s(379),d=s(1668),i=s(808),n=s(95);const o=n.Locale.getSection("admin.components.lists.dnsaclrecords"),l=({data:e,searchFilters:t})=>{const s=(0,i.useNavigateCallback)(),l=(0,a.useMemo)(()=>[n.list.COLUMN_SELECTION,{header:o.lmsg("value"),sortable:!0,dataIndex:"value"}],[]),c=(0,a.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,a.useMemo)(()=>(0,a.jsx)(r.ListEmptyView,{title:o.lmsg("emptyViewTitle"),description:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:o.lmsg("emptyViewDescription1")}),(0,a.jsx)("p",{children:o.lmsg("emptyViewDescription2")})]}),actions:(0,a.jsx)(r.Button,{id:"buttonAddRecord",intent:"primary",component:"a",href:"/admin/dns/add-acl-record",onClick:s,children:o.lmsg("add")})}),[s]);return(0,a.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},2489(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(763),r=s.n(a),d=s(1672),i=s(777),n=s(2490),o=s(378);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:r().object.isRequired};const c=(0,i.withPageLayout)(l)},2488(e,t,s){s.r(t),s.d(t,{default:()=>a.default});var a=s(2489)}}]);
//# sourceMappingURL=acl-records.js.map?c0d87e0c132eec200c40