"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["views/admin/dns/acl-records"],{1659(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(757),r=s.n(a),d=s(90),i=s(1660);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},1663(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(757),r=s.n(a),d=s(373),i=s(90),n=s(802),o=s(372);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},1660(e,t,s){s.r(t),s.d(t,{default:()=>d});var a=s(372),r=s(90);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})}},2478(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(372),r=s(373),d=s(1659),i=s(802),n=s(90);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},2477(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(757),r=s.n(a),d=s(1663),i=s(771),n=s(2478),o=s(372);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)},2476(e,t,s){s.r(t),s.d(t,{default:()=>a.default});var a=s(2477)}}]);
//# sourceMappingURL=acl-records.js.map?f2e4cfaf445b62d4029f