import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/material.dart';
import 'package:smart_hotel_app/views/profile/index/cubit/profile_state.dart';

class ProfileCubit extends Cubit<ProfileState> {
  ProfileCubit() : super(const ProfileState()) {
    initData();
  }

  void initData() {
    emit(state.copyWith(
      phoneNumber: '15391514233',
      welcomeText: '欢迎来到智能酒店',
      menuList: [
        const MenuItem(icon: Icons.list, title: '设备列表'),
        const MenuItem(icon: Icons.warning_rounded, title: '告警信息'),
        const MenuItem(icon: Icons.info_outline, title: '帮助'),
        const MenuItem(icon: Icons.person_outline, title: '关于'),
        const MenuItem(icon: Icons.logout, title: '退出登录'),
        const MenuItem(icon: Icons.logout, title: '注销账号'),
      ],
    ));
  }
}