import {isAllowedTScope} from "../../lib/i18n";

function blockName(name, t) {
    if(isAllowedTScope('doc-tree', 'selection')) {
        let t_scope = (isAllowedTScope('doc-tree', 'selection') ? 'defaults.selection.' : '');
        return t(t_scope + name);
    }

    return t(name);
}

function rootBlockName(name, t) {
    if(isAllowedTScope('doc-tree', 'root')) {
        let t_scope = (isAllowedTScope('doc-tree', 'root') ? 'defaults.root.' : '');
        return t(t_scope + name);
    }

    return t(name);
}

export {blockName, rootBlockName};