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