1import{a as x}from"./chunk-23KJKC6K.js";import"./chunk-XSZTOJMI.js";import"./chunk-77NMTAFC.js";import"./chunk-BCPZPP5Y.js";import"./chunk-2SZU4ZME.js";import{d as h,e as $}from"./chunk-DAO3SMRL.js";import"./chunk-Z5DLUQQM.js";import"./chunk-TYFWTMGI.js";import"./chunk-I73U4EKQ.js";import{Cb as p,Db as n,Eb as o,Fb as A,Fd as U,Ob as E,Sb as r,Ua as l,Wb as N,Yb as d,Z as g,ca as T,da as u,fb as y,kc as P,lc as m,oa as O,wb as C,xb as s}from"./chunk-UWUNFDSH.js";import"./chunk-HSCBD3RX.js";function v(t,i){if(t&1&&(n(0,"p",12),P(1),o()),t&2){let e,_=d();l(),m((e=_.user())==null?null:e.fullName);}}function k(t,i){if(t&1&&(n(0,"div",21),P(1),o()),t&2){let e=d();l(),m(e.error());}}function w(t,i){if(t&1){let e=E();n(0,"button",23),N("click",function(){T(e);let a=d();return u(a.confirming.set(!0));}),r(1,5),o();}}function F(t,i){t&1&&(n(0,"span"),r(1,8),o());}function G(t,i){t&1&&(n(0,"span"),r(1,9),o());}function X(t,i){if(t&1){let e=E();n(0,"p",24),r(1,6),o(),n(2,"div",25)(3,"button",26),N("click",function(){T(e);let a=d();return u(a.confirmDelete());}),C(4,F,2,0,"span")(5,G,2,0,"span"),o(),n(6,"button",27),N("click",function(){T(e);let a=d();return u(a.confirming.set(!1));}),r(7,7),o()();}if(t&2){let e=d();l(3),p("disabled",e.busy()),l(),s(e.busy()?4:5),l(2),p("disabled",e.busy());}}var I=class t{portal=g(x);router=g(h);user=this.portal.currentUser;confirming=O(!1);busy=O(!1);error=O("");confirmDelete(){this.busy.set(!0),this.error.set(""),this.portal.deleteAccount().subscribe({next:()=>{this.busy.set(!1),this.router.navigate(["/"]);},error:i=>{this.busy.set(!1),this.error.set(i?.error?.message||"Could not delete your account. Please try again.");}});}static ɵfac=function(e){return new(e||t)();};static ɵcmp=y({type:t,selectors:[["app-portal-account"]],decls:21,vars:3,consts:()=>{let i;i="Account";let e;e="My details";let _;_="Your privacy & data";let a;a="Withdraw consent & delete account";let f;f=" Withdrawing your health-data consent deletes your Vitena account and all your data with it: profile, weight entries and food diary. What your health professionals recorded about you (appointments, notes) stays with them. This can't be undone. ";let S;S=" Withdraw consent & delete my account ";let M;M="Are you sure? This is permanent.";let R;R=" Cancel ";let L;L="Deleting...";let b;return b="Yes, delete everything",[i,e,_,a,f,S,M,R,L,b,[1,"account-page"],[1,"account-title"],[1,"account-name"],[1,"account-links"],["routerLink","/portal/profile",1,"account-link"],[1,"bi","bi-person-vcard"],["routerLink","/portal/privacy",1,"account-link"],[1,"bi","bi-shield-check"],[1,"danger-zone"],[1,"danger-title"],[1,"danger-desc"],["role","alert",1,"account-error"],["type","button",1,"btn-danger"],["type","button",1,"btn-danger",3,"click"],[1,"confirm-text"],[1,"confirm-actions"],["type","button",1,"btn-danger",3,"click","disabled"],["type","button",1,"btn-secondary",3,"click","disabled"]];},template:function(e,_){if(e&1&&(n(0,"div",10)(1,"h1",11),r(2,0),o(),C(3,v,2,1,"p",12),n(4,"nav",13)(5,"a",14),A(6,"i",15),n(7,"span"),r(8,1),o()(),n(9,"a",16),A(10,"i",17),n(11,"span"),r(12,2),o()()(),n(13,"section",18)(14,"h2",19),r(15,3),o(),n(16,"p",20),r(17,4),o(),C(18,k,2,1,"div",21),C(19,w,2,0,"button",22)(20,X,8,3),o()()),e&2){let a;l(3),s((a=_.user())!=null&&a.fullName?3:-1),l(15),s(_.error()?18:-1),l(),s(_.confirming()?20:19);}},dependencies:[U,$],styles:[".account-page[_ngcontent-%COMP%]{max-width:640px;margin:0 auto;padding:1.5rem}.account-title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;color:#212529;margin-bottom:.25rem}.account-name[_ngcontent-%COMP%]{color:#6c757d;margin-bottom:1.5rem}.account-links[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem;margin-bottom:2rem}.account-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;color:#03a791;text-decoration:none;font-weight:600}.account-link[_ngcontent-%COMP%]:hover{color:#028a77}.account-error[_ngcontent-%COMP%]{background:#f8d7da;color:#842029;border-radius:8px;padding:.6rem .9rem;font-size:.875rem;margin-bottom:1rem}.danger-zone[_ngcontent-%COMP%]{border:1px solid #f1c0c0;background:#fdf3f3;border-radius:12px;padding:1.25rem 1.5rem}.danger-title[_ngcontent-%COMP%]{font-size:1.1rem;font-weight:700;color:#b02a2a;margin-bottom:.5rem}.danger-desc[_ngcontent-%COMP%]{color:#6c757d;font-size:.9rem;line-height:1.5;margin-bottom:1rem}.confirm-text[_ngcontent-%COMP%]{color:#b02a2a;font-weight:600;margin-bottom:.75rem}.confirm-actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;flex-wrap:wrap}.btn-danger[_ngcontent-%COMP%]{background:#dc3545;color:#fff;border:none;border-radius:8px;padding:.6rem 1.25rem;font-weight:600;cursor:pointer}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#b02a37}.btn-danger[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:default}.btn-secondary[_ngcontent-%COMP%]{background:#f1f3f5;color:#212529;border:1px solid #dee2e6;border-radius:8px;padding:.6rem 1.25rem;font-weight:600;cursor:pointer}.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled){background:#e9ecef}"]});};export{I as PortalAccountComponent};/**i18n:124ccf68d2f1268c4040d7fd92ec0e6a8c443ba8f9b9e552a35ffacd4fbcb105*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.