import{a as r,i as t}from"./createLucideIcon-mjjtyxlm.js";import{R as o}from"./ResourceCard-BdWfmJX4.js";import{a}from"./fetch_utils-9iXjNOiI.js";import{N as i}from"./Notification-E6BjStlk.js";import"./SimpleIcon-BGMhT-IK.js";import"./file-text-DLPhJfqV.js";let n=r({components:{ResourceCard:o,Notification:i},data(){return{error:null,success:!1,loading:!1,passwordData:{newUsername:"sunshine",newPassword:"",confirmNewPassword:""}}},methods:{save(){this.error=null,this.loading=!0,a("./api/password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.passwordData)}).then(s=>{this.loading=!1,s.status===200?s.json().then(e=>{this.success=e.status,this.success===!0?setTimeout(()=>{document.location.reload()},5e3):this.error=e.error}):this.error="Internal Server Error"})}}});t(n);
