import{a as e,i as t}from"./createLucideIcon-mjjtyxlm.js";import{N as a}from"./Navbar-BpjUb_C-.js";import{a as o}from"./fetch_utils-DBmgNZKq.js";import{S as n}from"./save-DWz7vErV.js";import"./Notification-CBHXi2s1.js";const i=e({components:{Navbar:a,Save:n},data(){return{error:null,success:!1,passwordData:{currentUsername:"",currentPassword:"",newUsername:"",newPassword:"",confirmNewPassword:""}}},methods:{save(){this.error=null,o("./api/password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.passwordData)}).then(s=>{s.status===200?s.json().then(r=>{this.success=r.status,this.success===!0?setTimeout(()=>{document.location.reload()},5e3):this.error=r.error}):this.error="Internal Server Error"})}}});t(i);
