(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/WebProsAccountPage"],{1452:(e,n,a)=>{"use strict";a.r(n),a.d(n,{default:()=>s.default});var s=a(1453)},1453:(e,n,a)=>{"use strict";a.r(n),a.d(n,{default:()=>d});var s=a(296),t=a(1454),c=a(346),i=a(90),o=a(297),r=a(546);a(1455);const l=i.Locale.getTranslate("components.pages.WebProsAccountPage"),d=(0,t.withInitLayout)(()=>{const{authUrl:e,allowSkip:n,errorMessage:a}=(0,c.usePageData)(),[t,d]=(0,s.useState)(!1),p=e=>{(0,r.addToast)({intent:"danger",message:e}),d(!1)};return(0,s.jsxs)("div",{className:"webpros-account-page",children:[!!a&&(0,s.jsx)(o.StatusMessage,{intent:"danger",children:a}),(0,s.jsx)(o.Heading,{level:4,children:(0,s.jsx)(l,{content:"descriptionHead"})}),(0,s.jsx)("p",{children:(0,s.jsx)(l,{content:"descriptionBody"})}),(0,s.jsxs)("span",{className:"webpros-account-page__action-buttons",children:[(0,s.jsx)(o.Button,{id:"wepros-account-login",size:"lg",intent:"primary",component:"a",href:e,rel:"noopener noreferrer",children:(0,s.jsx)(l,{content:"buttonLogin"})}),n&&(0,s.jsx)(o.Button,{id:"wepros-account-skip",size:"lg",onClick:async()=>{d(!0);try{const{error:e}=await i.api.post("/cp/webpros-account-skip");e?p(e):window.location.reload()}catch(e){e instanceof Error?p(e.message):p(String(e))}},state:t?"loading":void 0,className:"webpros-account-page__action-buttons__additional",children:(0,s.jsx)(l,{content:"buttonSkip"})})]})]})},{banner:a(1456)})},1454:(e,n,a)=>{"use strict";a.r(n),a.d(n,{default:()=>u,withInitLayout:()=>h});var s=a(296),t=a(668),c=a.n(t),i=a(297),o=a(90),r=a(1159),l=a(690);const d=o.Locale.getTranslate("components.shortcuts"),p=({banner:e,children:n})=>((0,s.useLayoutEffect)(()=>{(0,o.getComponent)("asyncProgressBarWrapper")?.hide()},[]),(0,s.jsxs)("div",{className:"init-page",children:[(0,s.jsx)(l.default,{layoutType:"simplified"}),(0,s.jsx)(i.Layout,{type:"simplified",className:"init-page__inner",header:(0,s.jsxs)("div",{className:"init-page-header",children:[(0,s.jsx)("div",{className:"init-page-header__brand",children:(0,s.jsx)(r.default,{})}),(0,s.jsx)("div",{className:"init-page-header__actions",children:(0,s.jsxs)("a",{className:"init-page-header__action",href:"/logout.php","data-type":"link-logout",children:[(0,s.jsx)("span",{className:"icon",children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,s.jsx)("path",{fill:"currentColor",d:"M13,16H6v3.573c0,0.078-0.045,0.148-0.115,0.181s-0.153,0.022-0.213-0.027l-4.75-3.958 c-0.228-0.19-0.36-0.471-0.36-0.768c0-0.297,0.132-0.578,0.36-0.768l4.75-3.958c0.06-0.05,0.143-0.06,0.213-0.028 C5.955,10.279,6,10.349,6,10.427V14h7c0.552,0,1,0.448,1,1C14,15.552,13.552,16,13,16z M32,2v21.13c0,0.538-0.288,1.035-0.756,1.302 l-11,6.286c-0.231,0.132-0.487,0.198-0.744,0.198c-0.26,0-0.52-0.068-0.753-0.203C18.285,30.444,18,29.95,18,29.415V26h-4 c-1.105,0-2-0.895-2-2v-3.5c0-0.276,0.224-0.5,0.5-0.5h1c0.276,0,0.5,0.224,0.5,0.5V24h4V8.87c0-0.538,0.288-1.035,0.756-1.302 L28.5,2H14v7.5c0,0.276-0.224,0.5-0.5,0.5h-1C12.224,10,12,9.776,12,9.5V2c0-1.105,0.895-2,2-2h16C31.105,0,32,0.895,32,2z M30,3.446L20,9.161V24v2v2.554l10-5.714V3.446z"})})}),(0,s.jsx)(d,{content:"logOut"})]})})]}),contentAddon:e?(0,s.jsx)("div",{className:"init-page__banner",children:(0,s.jsx)("img",{className:"init-page__banner-image",src:e,alt:""})}):null,children:(0,s.jsx)("div",{id:"main",className:"init-page__content",children:n})})]}));p.propTypes={children:c().any,banner:c().any};const h=(e,{banner:n})=>{const a=a=>(0,s.jsx)(p,{banner:n,children:(0,s.jsx)(e,{...a})});return a.displayName=`withInitLayout(${e.displayName||e.name||"Component"})`,a.WrappedComponent=e,a},u=p},1455:(e,n,a)=>{"use strict";a.r(n)},1456:e=>{e.exports=Jsw.skinUrl+"/images/webpros-account.png?be9002494c218e37cd62905589a67d16"}}]); //# sourceMappingURL=WebProsAccountPage.js.map?8ec67f4c3136ad7df0a8