// form/local/input/person/person.js
// eslint-disable-next-line no-unused-vars
const showUserInfo = ref(false)

// eslint-disable-next-line no-unused-vars
const passwordIsValid = computed(() => {
	return rec.new_password1 && rec.new_password1 === rec.new_password2 && rec.new_password1.length >= 6
})

// eslint-disable-next-line no-unused-vars
function changePassword(new_password) {
	nc.callServer(state, 'auth/password_hash', { password: new_password }, ret => {
		if (ret.data && ret.data.password_hash) {
			// rec.per.password_hash = ret.data.password_hash
			nc.setRec(state, 'per.password_hash', ret.data.password_hash)
		}
	})
}
