(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[229],{7471:function(e,r,s){Promise.resolve().then(s.bind(s,5164))},5164:function(e,r,s){"use strict";s.d(r,{BecomeOwnerPanel:function(){return d}});var n=s(7437),i=s(7138),t=s(9793),a=s(7185),c=s(2808),o=s(7465),u=s(5524),l=s(9162);function d(){let e=function(){let{becomeOwner:e,isAuthenticated:r,isOwner:s,status:n}=(0,l.a)(),i=(0,u.D)({mutationFn:()=>e()});return{authStatus:n,isAuthenticated:r,isOwner:s,submit:()=>i.mutate(),isSubmitting:i.isPending,isSuccess:i.isSuccess,errorMessage:i.error instanceof Error?i.error.message:null}}();return"loading"===e.authStatus?(0,n.jsx)(o.a,{}):e.isAuthenticated?e.isOwner?(0,n.jsxs)(t.Z,{variant:"success",children:["Vous \xeates d\xe9j\xe0 propri\xe9taire \uD83C\uDF89"," ",(0,n.jsx)(t.Z.Link,{as:i.default,href:"/properties",children:"G\xe9rer mes annonces"})]}):(0,n.jsx)(a.Z,{className:"shadow-sm border-0",children:(0,n.jsxs)(a.Z.Body,{children:[(0,n.jsx)(a.Z.Title,{className:"fs-4 mb-3",children:"Devenir propri\xe9taire"}),(0,n.jsx)(a.Z.Text,{className:"text-secondary",children:"Activez votre espace propri\xe9taire pour publier vos logements \xe0 la location. Vous conservez votre compte client et pouvez continuer \xe0 r\xe9server."}),e.errorMessage&&(0,n.jsx)(t.Z,{variant:"danger",children:e.errorMessage}),e.isSuccess?(0,n.jsxs)(t.Z,{variant:"success",className:"mb-0",children:["F\xe9licitations, votre compte est d\xe9sormais propri\xe9taire !"," ",(0,n.jsx)(t.Z.Link,{as:i.default,href:"/properties",children:"Publier une annonce"})]}):(0,n.jsx)(c.Z,{variant:"primary",onClick:e.submit,disabled:e.isSubmitting,children:e.isSubmitting?"Activation…":"Activer mon espace propri\xe9taire"})]})}):(0,n.jsxs)(t.Z,{variant:"info",children:["Vous devez \xeatre connect\xe9 pour devenir propri\xe9taire."," ",(0,n.jsx)(t.Z.Link,{as:i.default,href:"/login",children:"Se connecter"})]})}},7465:function(e,r,s){"use strict";s.d(r,{a:function(){return t}});var n=s(7437),i=s(2514);function t(e){let{label:r="Chargement…"}=e;return(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-center gap-2 py-5 text-secondary",role:"status","aria-live":"polite",children:[(0,n.jsx)(i.Z,{animation:"border",size:"sm",style:{color:"var(--brand-primary)"}}),(0,n.jsx)("span",{children:r})]})}}},function(e){e.O(0,[836,231,492,772,969,162,971,23,744],function(){return e(e.s=7471)}),_N_E=e.O()}]);