const js = `let ab = {status: 'draft'};
let actions = \`
  \${ab.status === 'draft' ? \`<button>اعتماد</button>\` : ''}
\`;`;

try {
    new Function(js);
    console.log("Syntax is VALID!");
} catch (e) {
    console.log("Syntax is INVALID!", e);
}
