"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/VirtualDirectoryPage/ErrorDocList"],{2837:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o.default});var o=r(2838)},2838:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(598),a=r(296),s=r(90),n=r(1169),c=r(1240),i=r.n(c),l=r(295);const d=s.Locale.getTranslate("components.pages.VirtualDirectory.ErrorDocList"),p=s.Locale.getSection("components.pages.VirtualDirectory.errorDocType"),u=()=>{const{errorDocListKey:e}=(0,o.useLoaderData)(),{domainId:t}=(0,o.useParams)(),[r]=(0,o.useSearchParams)(),s=r.get("path")||"/",{listProps:c,listInput:u}=(0,n.useGraphQlList)({key:e,query:i(),variables:{domainId:btoa(`Domain:${t}`),path:s},extractList:e=>e.domain.hosting.virtualDirectory.errorDocs}),m=!!u.searchFilters?.search,h=(0,l.jsx)(n.GraphQlList,{...c,rowKey:"code",filtered:m,columns:[{key:"code",title:(0,l.jsx)(d,{content:"columnCode"}),sortable:!0,type:"title"},{key:"name",title:(0,l.jsx)(d,{content:"columnName"}),sortable:!0},{key:"type",title:(0,l.jsx)(d,{content:"columnType"}),sortable:!0,render:({type:e})=>p.lmsg(e.toLowerCase())},{key:"location",title:(0,l.jsx)(d,{content:"columnLocation"}),sortable:!0},{key:"actions",type:"actions",render:({code:e})=>(0,l.jsx)(a.ListActions,{children:(0,l.jsx)(a.ListAction,{primary:!0,icon:"pencil",component:o.Link,to:{...location,pathname:`${e}/edit`},"data-testid":"error-doc-edit",children:(0,l.jsx)(d,{content:"edit"})})})}],toolbar:(0,l.jsxs)(a.Toolbar,{children:[(0,l.jsx)(a.ToolbarExpander,{}),(0,l.jsx)(a.ToolbarGroup,{groupable:!1,children:(0,l.jsx)(n.GraphQlList.SearchBar,{name:"search"})})]})});return(0,l.jsxs)(l.Fragment,{children:[h,(0,l.jsx)(o.Outlet,{})]})}}}]);
//# sourceMappingURL=ErrorDocList.js.map?30ec04ff8c7fdeca027d