{"size": 989, "ext": "js", "max_stars_repo_path": "app/network/network.html.js", "max_stars_repo_name": "PinkDiamond1/bitcoinjs-ui", "max_stars_repo_stars_event_min_datetime": "2020-12-14T23:44:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T09:10:07.000Z", "max_issues_repo_path": "app/network/network.html.js", "max_issues_repo_name": "PinkDiamond1/bitcoinjs-ui", "max_issues_repo_issues_event_min_datetime": "2020-11-16T14:42:08.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-28T08:56:42.000Z", "max_forks_repo_path": "app/network/network.html.js", "max_forks_repo_name": "PinkDiamond1/bitcoinjs-ui", "max_forks_repo_forks_event_min_datetime": "2020-12-17T12:03:43.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-10T10:44:05.000Z"}
{"max_stars_count": 26, "max_issues_count": 5, "max_forks_count": 3, "avg_line_length": 36.6296296296, "max_line_length": 97, "alphanum_fraction": 0.593528817}
networkComponent.createNew = function createNew(op) {
    return `
        
        <div class="input-group mb-3 input-group-sm">
            <select id="network-${op.containerUUID}" class="form-control ">
                <option value="testnet">Test</option>
                <option value="bitcoin">Main</option>            
                <option value="regtest">Regression</option>
            </select>
            <div class="input-group-append">
                <label class="input-group-text" for="network-${op.containerUUID}">Network</label>
            </div>
        </div>
    `;
}

networkComponent.dataToHtml = function (containerUUID, data) {
    if (!containerUUID || !data) {
        return;
    }
    $(`#network-${containerUUID}`).val(data.network || 'testnet');
}

networkComponent.htmlToData = function htmlToData(containerUUID) {
    const networkName = $(`#network-${containerUUID}`).val();
    return bitcoinjs.networks[networkName] || bitcoinjs.networks.bitcoin;
}