import Yasr from "@matdata/yasr";
import { default as Yasqe } from "@matdata/yasqe";
export default function initialize() {
    return {
        autofocus: true,
        endpointInfo: undefined,
        persistenceId: function (yasgui) {
            var id = "";
            var elem = yasgui.rootEl;
            if (elem.id)
                id = elem.id;
            for (; elem && elem !== document; elem = elem.parentNode) {
                if (elem) {
                    if (elem.id)
                        id = elem.id;
                    break;
                }
            }
            return "yagui_" + id;
        },
        tabName: "Query",
        persistencyExpire: 60 * 60 * 24 * 30,
        persistenceLabelResponse: "response",
        persistenceLabelConfig: "config",
        yasqe: Yasqe.defaults,
        yasr: Yasr.defaults,
        theme: undefined,
        showThemeToggle: true,
        orientation: "vertical",
        showSnippetsBar: true,
        endpointButtons: undefined,
        endpointCatalogueOptions: {
            getData: () => {
                return [
                    {
                        endpoint: "https://dbpedia.org/sparql",
                    },
                    {
                        endpoint: "https://query.wikidata.org/bigdata/namespace/wdq/sparql",
                    },
                ];
            },
            keys: [],
            renderItem: (data, source) => {
                var _a;
                const contentDiv = document.createElement("div");
                contentDiv.style.display = "flex";
                contentDiv.style.flexDirection = "column";
                const endpointSpan = document.createElement("span");
                endpointSpan.innerHTML =
                    ((_a = data.matches.endpoint) === null || _a === void 0 ? void 0 : _a.reduce((current, object) => (object.highlight ? current + object.text.bold() : current + object.text), "")) || "";
                contentDiv.appendChild(endpointSpan);
                source.appendChild(contentDiv);
            },
        },
        copyEndpointOnNewTab: true,
        populateFromUrl: true,
        autoAddOnInit: true,
        requestConfig: Yasqe.defaults.requestConfig,
        contextMenuContainer: undefined,
    };
}
//# sourceMappingURL=defaults.js.map