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