blob: 1c99729dcf1f83e8cd52e0599a4638e98b839401 [file] [log] [blame]
import {isOptionEnabled} from '../../../common/optionsUtils.js';
import {addElementToThreadListActions, shouldAddBtnToActionBar} from '../utils/common.js';
const wfDebugId = 'twpt-workflows';
export default class Workflows {
constructor() {}
addThreadListBtnIfEnabled(readToggle) {
isOptionEnabled('workflows').then(isEnabled => {
if (isEnabled) {
const menu = document.createElement('twpt-workflows-menu');
addElementToThreadListActions(readToggle, menu);
}
});
}
shouldAddThreadListBtn(node) {
return shouldAddBtnToActionBar(wfDebugId, node);
}
};