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