function createSubCircuitPrompt(scope = globalScope) {
    if(verilogModeGet() || layoutModeGet()) {
        showError("Subcircuit cannot be inserted in this mode");
        return;
    }
    $("#insertSubcircuitDialog").empty();
    let flag = true;
    for (id in scopeList) {
        if (!scopeList[id].checkDependency(scope.id) && scopeList[id].isVisible()) {
            flag = false; 
            $("#insertSubcircuitDialog").append(
                `<label class="option custom-radio inline"><input type="radio" name="subCircuitId" value="${id}" />${scopeList[id].name}<span></span></label>`
            );
        }
    }  
    if(flag) {    
        $("#insertSubcircuitDialog").append(
            [$("#insertSubcircuitcontent").dialog(),
             $("#insertSubcircuitcontent").dialog("close")]
        );
    } 
    $("#insertSubcircuitDialog").dialog({
        resizable:false,
        maxHeight: 800,
        width: 450,
        maxWidth: 800,
        minWidth: 250,
        buttons: !flag
            ? [
                  {
                      text: "Insert SubCircuit",
                      click() {
                          if (!$("input[name=subCircuitId]:checked").val())
                              return;
                          simulationArea.lastSelected = new SubCircuit(
                              undefined,
                              undefined,
                              globalScope,
                              $("input[name=subCircuitId]:checked").val()
                          );
                          $(this).dialog("close");
                      },
                  },
              ]
            : [],
    });
}
Prompt to create subcircuit, shows list of circuits which dont depend on the current circuit
@param {Scope=} scope
@category subcircuit