we are having JavaScript Button in salesforce classic that contains functionality of
{!requireScript("/soap/ajax/31.0/connection.js")}
{!requireScript("/support/console/31.0/integration.js")}
{!REQUIRESCRIPT("/xdomain/xdomain.js")}
and also using this functionality to open funtion in sub tab
sforce.console.getEnclosingPrimaryTabId(function (result) {
sforce.console.openSubtab();
}
But now we are migrating to lightning. how to achieve this type of functionality in lightning Component, is there any work around process