2020-05-09 16:32:43 +00:00
|
|
|
export default {
|
|
|
|
computed: {
|
|
|
|
useInboxAvatarForBot() {
|
|
|
|
return window.chatwootWidgetDefaults.useInboxAvatarForBot;
|
|
|
|
},
|
|
|
|
hasAConnectedAgentBot() {
|
|
|
|
return !!window.chatwootWebChannel.hasAConnectedAgentBot;
|
|
|
|
},
|
|
|
|
inboxAvatarUrl() {
|
|
|
|
return window.chatwootWebChannel.avatarUrl;
|
|
|
|
},
|
|
|
|
channelConfig() {
|
|
|
|
return window.chatwootWebChannel;
|
|
|
|
},
|
2020-08-05 12:16:17 +00:00
|
|
|
hasEmojiPickerEnabled() {
|
|
|
|
return this.channelConfig.enabledFeatures.includes('emoji_picker');
|
|
|
|
},
|
|
|
|
hasAttachmentsEnabled() {
|
|
|
|
return this.channelConfig.enabledFeatures.includes('attachments');
|
|
|
|
},
|
2021-02-15 18:44:13 +00:00
|
|
|
preChatFormEnabled() {
|
|
|
|
return window.chatwootWebChannel.preChatFormEnabled;
|
|
|
|
},
|
|
|
|
preChatFormOptions() {
|
2021-06-30 15:39:44 +00:00
|
|
|
let requireEmail = false;
|
|
|
|
let preChatMessage = '';
|
2021-02-15 18:44:13 +00:00
|
|
|
const options = window.chatwootWebChannel.preChatFormOptions || {};
|
2021-06-30 15:39:44 +00:00
|
|
|
if (!this.isOnNewConversation) {
|
|
|
|
requireEmail = options.require_email;
|
|
|
|
preChatMessage = options.pre_chat_message;
|
|
|
|
}
|
2021-02-15 18:44:13 +00:00
|
|
|
return {
|
2021-06-30 15:39:44 +00:00
|
|
|
requireEmail,
|
|
|
|
preChatMessage,
|
2021-02-15 18:44:13 +00:00
|
|
|
};
|
|
|
|
},
|
2020-05-09 16:32:43 +00:00
|
|
|
},
|
|
|
|
};
|