"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/VirtualDirectoryPage"],{2352:(t,e,s)=>{s.r(e),s.d(e,{default:()=>x});var n=s(575),a=s(574),i=s(272),r=s.n(i),o=s(271),c=s(760),l=s.n(c),p=s(581),d=s(89),h=s(270);const u=d.Locale.getTranslate("components.pages.VirtualDirectory"),m=({params:{domainId:t}})=>{const e=(0,n.useLocation)(),s=(0,n.useNavigate)(),[i]=(0,a.useSearchParams)(),r=i.get("path")||"/",{data:{domain:{name:c,webScriptingSettings:{errorDocs:d},hosting:{virtualDirectory:{isVirtual:m,doesExist:x,isReadable:b}},subscription:{permissions:{manageProtectedDirectories:j}}}}}=(0,p.useQuery)(l(),{variables:{domainId:btoa(`Domain:${t}`),path:r}}),g=[{path:"browse",title:(0,h.jsx)(u,{content:"tabBrowse"}),hint:(0,h.jsx)(u,{content:"tabBrowseHint",params:{site:c}})},m&&{path:"mime-types",title:(0,h.jsx)(u,{content:"tabMimeTypes"}),hint:(0,h.jsx)(u,{content:"tabMimeTypesHint"})},m&&d&&{path:"error-docs",title:(0,h.jsx)(u,{content:"tabErrorDocs"}),hint:(0,h.jsx)(u,{content:"tabErrorDocsHint"})},j&&{path:"protection",title:(0,h.jsx)(u,{content:"tabProtection"}),hint:(0,h.jsx)(u,{content:"tabProtectionHint"})}].filter(Boolean),v=g.findIndex((({path:t})=>e.pathname.includes(t)))+1;return(0,h.jsxs)(h.Fragment,{children:[!x&&(0,h.jsx)(o.StatusMessage,{intent:"danger",children:(0,h.jsx)(u,{content:"errNotExist"})}),x&&!b&&(0,h.jsx)(o.StatusMessage,{intent:"warning",children:(0,h.jsx)(u,{content:"errNoPermissions"})}),(0,h.jsx)(o.Tabs,{active:v,children:g.map((({path:t,title:n,hint:a})=>(0,h.jsx)(o.Tab,{title:(0,h.jsx)(o.Tooltip,{title:a,children:(0,h.jsx)("span",{children:n})}),onActivate:()=>s({...e,pathname:`./${t}`},{preventScrollReset:!0})},t)))}),(0,h.jsx)(n.Outlet,{})]})};m.propTypes={params:r().object.isRequired};const x=m},2351:(t,e,s)=>{s.r(e),s.d(e,{default:()=>n.default});var n=s(2352)}}]);
//# sourceMappingURL=VirtualDirectoryPage.js.map?0991ec05f0e366c124a8