import{c as e,i as t,u as n}from"./logo-sunshine-45-B0-ae2pw.js";import{t as r}from"./ResourceCard-TSqBS1Af.js";import{t as i}from"./Notification-CxaUkThL.js";import{n as a,t as o}from"./NavbarSimple-DweSZFdP.js";import{t as s}from"./fetch_utils-4pUjSOEQ.js";t();var c=n({components:{ResourceCard:r,Notification:i,NavbarSimple:o,LogIn:a},data(){return{error:null,success:!1,loading:!1,passwordData:{newUsername:`sunshine`,newPassword:``,confirmNewPassword:``}}},methods:{save(){this.error=null,this.loading=!0,s(`./api/password`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(this.passwordData)}).then(e=>{this.loading=!1,e.status===200?e.json().then(e=>{this.success=e.status,this.success===!0?setTimeout(()=>{document.location.reload()},5e3):this.error=e.error}):this.error=`Internal Server Error`})}}});e(c);