import{u as j,a as D,c as g,i as n,m as b,e as f,l as _,g as G,t as s,f as I}from"./main-B-KzsHRi.js";var q=s("<div class=freno-profile><div class=freno-page-header><h1>Profile</h1></div><div class=freno-profile-card><div class=freno-profile-header><div class=freno-avatar-large></div><div class=freno-profile-info><p class=freno-email></p><span></span></div></div><div class=freno-profile-details><dl class=freno-dl><dt>User ID</dt><dd class=freno-mono></dd></dl></div></div><div class=freno-section><h2>Preferences</h2><div class=freno-preferences><div class=freno-preference-item><div><h3>Email Notifications</h3><p>Receive email updates about project activity</p></div><label class=freno-toggle><input type=checkbox checked><span class=freno-toggle-slider></span></label></div><div class=freno-preference-item><div><h3>Collaboration Alerts</h3><p>Get notified when others edit your documents</p></div><label class=freno-toggle><input type=checkbox checked><span class=freno-toggle-slider>"),z=s("<img class=freno-avatar-img>"),B=s("<span>"),F=s('<div class=freno-edit-name><input type=text class=freno-input><button class="freno-btn freno-btn-primary">Save</button><button class="freno-btn freno-btn-secondary">Cancel'),H=s('<div class=freno-name-row><h2></h2><button class="freno-btn freno-btn-small">Edit');const K=()=>{const x=j(),{updateUser:C}=D(),[S,o]=g(!1),[v,p]=g(""),r=()=>x().user,k=async()=>{const a=r();a&&(await C({name:v().trim()||a.name}),o(!1))},y=()=>{const a=r();a&&(p(a.name),o(!0))};return(()=>{var a=q(),U=a.firstChild,A=U.nextSibling,u=A.firstChild,m=u.firstChild,$=m.nextSibling,c=$.firstChild,h=c.nextSibling,E=u.nextSibling,w=E.firstChild,N=w.firstChild,P=N.nextSibling;return n(m,(()=>{var d=b(()=>!!r()?.avatarUrl);return()=>d()?(()=>{var e=z();return f(t=>{var l=r().avatarUrl,i=r().name;return l!==t.e&&_(e,"src",t.e=l),i!==t.t&&_(e,"alt",t.t=i),t},{e:void 0,t:void 0}),e})():(()=>{var e=B();return n(e,()=>r()?.name?.charAt(0)?.toUpperCase()||"U"),e})()})()),n($,(()=>{var d=b(()=>!!S());return()=>d()?(()=>{var e=F(),t=e.firstChild,l=t.nextSibling,i=l.nextSibling;return t.$$input=R=>p(R.target.value),l.$$click=k,i.$$click=()=>o(!1),f(()=>t.value=v()),e})():(()=>{var e=H(),t=e.firstChild,l=t.nextSibling;return n(t,()=>r()?.name),l.$$click=y,e})()})(),c),n(c,()=>r()?.email),n(h,()=>r()?.role),n(P,()=>r()?.id),f(()=>G(h,`freno-badge freno-badge-${r()?.role}`)),a})()};I(["input","click"]);export{K as UserProfile};
//# sourceMappingURL=UserProfile-Ck2xTzTS.js.map
