import {defineStore} from 'pinia';

import {reactive} from 'vue';
import { book_item_data, user_status } from '../data/data';
export const UserStatus = defineStore('user-status',()=>{
	let data:user_status = reactive(new user_status())
	async function updateUserSelectBook(d:book_item_data){
		data.cur_select_book_data=d;
	}
	function getUserSelectBook():book_item_data{
		if(data==null){
			return null
		}
		if(data.cur_select_book_data==null){
			return null
		}
		return data.cur_select_book_data
	}
	return {data,getUserSelectBook,updateUserSelectBook}
})