/**
 * 定义接口来定义对象的类型
 * `stores` 全部类型定义在这里
 */
declare interface UserInfosState {
	authBtnList: string[];
	photo: string;
	token?: string;
	id: string;
	name: string;
	phoneNo: string;
	staffNo?: string;
	defaultTelNo?: string;
	deletionTime?: string;
	isDeleted?: boolean;
	showTelControl: boolean;
	orgName: string;
	roles: string[];
	account: string;
}
declare interface UserInfosStates {
	userInfos: UserInfosState;
}

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

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

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

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

// 布局配置
declare 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;
	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;
}
declare interface ThemeConfigStates {
	themeConfig: ThemeConfigState;
}
declare interface AppConfigState {
	AppConfigInfo: {
		IsRestApproval: boolean; // 电话控件小休是否要进行审批
		IsAutoTalkingDeal: boolean; // 呼叫中心是否自动事后处理
		TalkingDealTime: number; // 呼叫中心事后处理时间
		[x: string]: any
	}
}

enum TelStates {
	dutyOff = 'dutyOff', // 签出
	dutyOn = 'dutyOn', // 签入
	rest = 'rest',  // 小休
	ring = 'ring', // 来电响铃
	onHold = 'onHold', // 保持中
	onTransferSuccess = 'onTransferSuccess', // 转接成功，可以开始三方通话
	onCall = 'onCall', // 一通电话通话中
	onTalkingDeal = 'onTalkingDeal', 		// 事后处理中
	onConference = 'onConference' // 一通电话通话中，会议中
}
enum RestStates {
	resting = 'resting', // 小休中
	InReview = 'InReview', // 小休审批中
	unRest = 'unRest' // 未小休
}
declare interface TelsStateInfos {
	telStatusInfo: {
		isDutyOn: boolean;  // 是否签入
		isRest: RestStates; // 是否小休
		isTalkingDeal: boolean; // 是否事后处理
		isMeeting: boolean; // 是否会议中
		isHold:boolean; // 是否保持中
		phoneControlState: TelStates;  // 电话控件状态
		groupName: string | number; // 分机组名称
		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; // 通话时长
	}
}