{
    // const currentlySelectedVersionRegex = /\/documentation\/(\d+\.\d+.\d+)\//;
    // const match = window.location.pathname.match(currentlySelectedVersionRegex);
    // const node = document.querySelector('[name="as_sitesearch"]');
    // if (node) {
    //   node.value = `franz.com/agraph/support/documentation/${(match && match[1]) || GLOBAL_AG_VERSION}/`;
    // }
    const requestUrl = new URL('/search-ag-docs', window.origin);
    requestUrl.searchParams.set('agversion', 'dummy');
    fetch(requestUrl.toString())
        .then(response => {
            if (response.ok) {
                return '';
            }
            return response.text();
        })
        .then((errorMessage) => {
            const inputNode = document.querySelector('#search-form [name="q"]');
            const submitNode = document.querySelector('#search-form [value="Smart Search"]');
            if (inputNode && submitNode) {
                if (errorMessage.includes('agversion parameter')) {
                    submitNode.removeAttribute('disabled');
                    inputNode.removeAttribute('disabled');
                    inputNode.setAttribute('placeholder', 'Your question in natural language');
                } else {
                    inputNode.setAttribute('placeholder', 'Search is not available');
                }
            }
        })
}