/*
 * @Author: zc
 * @Description:
 * @version: 
 * @Date: 2022-08-09 16:19:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-16 15:10:29
 */
/**
 * 定义接口来定义对象的类型
 * `stores` 全部类型定义在这里
 */

// 用户信息
export interface UserInfosState {
	authBtnList: string[];
	photo: string;
	token?: string;
	id: string;
	name: string;
	phoneNo: string;
	staffNo?: string;
	defaultTelNo?: string;
	deletionTime?: string;
	isDeleted?: boolean;
	showTelControl: boolean;
}
export interface UserInfosStates {
	userInfos: UserInfosState;
}

// 路由缓存列表
export interface KeepAliveNamesState {
	keepAliveNames: string[];
	cachedViews: string[];
}

// 后端返回原始路由(未处理时)
export interface RequestOldRoutesState {
	requestOldRoutes: string[];
}

// TagsView 路由列表
export interface TagsViewRoutesState {
	tagsViewRoutes: string[];
	isTagsViewCurrenFull: Boolean;
}

// 路由列表
export interface RoutesListState {
	routesList: string[];
	isColumnsMenuHover: Boolean;
	isColumnsNavHover: Boolean;
}

// 布局配置
export interface ThemeConfigState {
	isDrawer: boolean;
	primary: string;
	topBar: string;
	topBarColor: string;
	isTopBarColorGradual: boolean;
	menuBar: string;
	menuBarColor: string;
	isMenuBarColorGradual: boolean;
	columnsMenuBar: string;
	columnsMenuBarColor: string;
	isColumnsMenuBarColorGradual: boolean;
	isColumnsMenuHoverPreload: boolean;
	isCollapse: boolean;
	isUniqueOpened: boolean;
	isFixedHeader: boolean;
	isFixedHeaderChange: boolean;
	isClassicSplitMenu: boolean;
	isLockScreen: boolean;
	lockScreenTime: number;
	isShowLogo: boolean;
	isShowLogoChange: boolean;
	isBreadcrumb: boolean;
	isTagsview: boolean;
	isBreadcrumbIcon: boolean;
	isTagsviewIcon: boolean;
	isCacheTagsView: boolean;
	isSortableTagsView: boolean;
	isShareTagsView: boolean;
	isFooter: boolean;
	isGrayscale: boolean;
	isInvert: boolean;
	isIsDark: boolean;
	isWatermark: boolean;
	watermarkText: string;
	tagsStyle: string;
	animation: string;
	columnsAsideStyle: string;
	columnsAsideLayout: string;
	layout: string;
	isRequestRoutes: boolean;
	globalTitle: string;
	globalViceTitle: string;
	globalI18n: string;
	globalComponentSize: string;
	loginImage: string;
}
export interface ThemeConfigStates {
	themeConfig: ThemeConfigState;
}
export enum TelStates {
	dutyOff = 'dutyOff', // 签出
	dutyOn = 'dutyOn', // 签入
	rest = 'rest',  // 小休
	ring = 'ring', // 来电响铃
	onHold = 'onHold', // 保持中
	oneHoldOneCall = 'oneHoldOneCall', // 一通电话保持中，一通电话通话中 可以三方通话
	onCall = 'onCall', // 一通电话通话中
	onMute = 'onMute', 		// 一通电话通话中，静音中
	onConference = 'onConference' // 一通电话通话中，会议中
}
export enum RestStates {
	resting = 'resting', // 小休中
	InReview = 'InReview', // 小休审批中
	unRest = 'unRest' // 未小休
}
export interface TelsStateInfos {
	telStatusInfo: {
		isDutyOn: boolean;  // 是否签入
		isRest: RestStates; // 是否小休
		isMute: boolean; // 是否静音
		isMeeting: boolean; // 是否会议中
		isHold:boolean; // 是否保持中
		phoneControlState: TelStates;  // 电话控件状态
		telsNo: string | number; // 电话号码
		telGongHao: string | number; // 电话工号
		telArea: string | number; // 电话区号
		telGuid: string | number; // 电话guid
		telIVR: string | number; // 电话IVR
		telType: string | number; //来电 外呼 转接
		fromTel: string | number; // 来电号码
		callTime?: number; // 通话时长
	}
}
export interface AppConfigState {
	AppConfigInfo: {
		isRestApproval: boolean; // 电话控件小休是否要进行审批
		[x: string]: any
	}
}