/**
 * 新消息通道相关业务
 * 	新消息通道全部在base中，所以需要判断通道是否存在，防止新npm拉到老base出错。
 * */
if (global["__bili_channel"]) {
	// b-textfield 相关
	global["__bili_channel"].subscribe('Bili_Textfield_showKeyboard', (data) => {
		bl.showKeyboard(Object.assign({ hasButton: true}, data, {
			keyboardInput: (data)=>{
				global["__bili_channel"].publish('Bili_Textfield_Input', data)
			},
			keyboardConfirm: (data)=>{
				global["__bili_channel"].publish('Bili_Textfield_Confirm', data)
			},
			keyboardComplete: (data)=>{
				global["__bili_channel"].publish('Bili_Textfield_Complete', data)
			},
			complete: ()=>{
				global["__bili_channel"].publish('Bili_Textfield_Focus')
			}
		}))
	});

	global["__bili_channel"].subscribe('Bili_Textfield_changeValue', (data) => {
		bl.updateKeyboard(data)
	});
}
