"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/dns/acl-records"],{924:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(233),r=s.n(a),d=s(85),i=s(925);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,Object.keys(n));l.displayName="JswList",l.propTypes=n,l.defaultProps=o;const c=l},928:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(233),r=s.n(a),d=s(232),i=s(85),n=s(518),o=s(231);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}))},l.defaultProps={items:void 0};const c=l},925:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d});var a=s(231),r=s(85);const d=(e,t=[],s={})=>d=>{const i=(0,a.useRef)(),n=(0,a.useRef)(),[o,l]=Object.entries(d).reduce(((e,[s,a])=>(e[t.includes(s)?0:1][s]=a,e)),[{},{}]),c=t.map((e=>{const t=o[e];return s[e]?(n.current?.[s[e]](t),null):t}));return(0,a.useLayoutEffect)((()=>(n.current=new e(o),(0,r.render)(i.current,n.current),()=>{n.current.remove(),n.current=null})),[l.key,...c]),(0,a.jsx)("div",{ref:i,...l})}},1670:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(231),r=s(232),d=s(924),i=s(518),n=s(85);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},1669:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(233),r=s.n(a),d=s(928),i=s(790),n=s(1670),o=s(231);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)},1668:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a.default});var a=s(1669)}}]);
//# sourceMappingURL=acl-records.js.map?16dc61b724fcbf19dfe0