"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/VirtualDirectoryPage"],{2800:(t,e,s)=>{s.r(e),s.d(e,{default:()=>n.default});var n=s(2801)},2801:(t,e,s)=>{s.r(e),s.d(e,{default:()=>m});var n=s(598),a=s(667),i=s.n(a),r=s(296),o=s(1232),c=s.n(o),l=s(619),p=s(90),d=s(295);const h=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:x}},subscription:{permissions:{manageProtectedDirectories:b}}}}}=(0,l.useQuery)(c(),{variables:{domainId:btoa(`Domain:${t}`),path:i}}),j=[{path:"browse",title:(0,d.jsx)(h,{content:"tabBrowse"}),hint:(0,d.jsx)(h,{content:"tabBrowseHint",params:{site:o}})},u&&{path:"mime-types",title:(0,d.jsx)(h,{content:"tabMimeTypes"}),hint:(0,d.jsx)(h,{content:"tabMimeTypesHint"})},u&&p&&{path:"error-docs",title:(0,d.jsx)(h,{content:"tabErrorDocs"}),hint:(0,d.jsx)(h,{content:"tabErrorDocsHint"})},b&&{path:"protection",title:(0,d.jsx)(h,{content:"tabProtection"}),hint:(0,d.jsx)(h,{content:"tabProtectionHint"})}].filter(Boolean),g=j.findIndex(({path:t})=>e.pathname.includes(t))+1;return(0,d.jsxs)(d.Fragment,{children:[!m&&(0,d.jsx)(r.StatusMessage,{intent:"danger",children:(0,d.jsx)(h,{content:"errNotExist"})}),m&&!x&&(0,d.jsx)(r.StatusMessage,{intent:"warning",children:(0,d.jsx)(h,{content:"errNoPermissions"})}),(0,d.jsx)(r.Tabs,{active:g,children:j.map(({path:t,title:n,hint:a})=>(0,d.jsx)(r.Tab,{title:(0,d.jsx)(r.Tooltip,{title:a,children:(0,d.jsx)("span",{children:n})}),onActivate:()=>s({...e,pathname:`./${t}`},{preventScrollReset:!0})},t))}),(0,d.jsx)(n.Outlet,{})]})};u.propTypes={params:i().object.isRequired};const m=u}}]);
//# sourceMappingURL=VirtualDirectoryPage.js.map?c66c485204910eddc784