/**
* @license
* SPDX-License-Identifier: AGPL-3.0-or-later
* This file is part of Wolfree.
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*/
// @ts-check
export default class PodsParser {
parse = ({
input = String(),
i2d = Boolean(),
extraPodstates = Array(),
response = { queryresult: { pods: Array() } },
} = {}) => {
try {
return { html: this.buildHTML({ input, i2d, extraPodstates, response }) };
} catch (error) {
return console.error({ error }), { error };
}
};
buildHTML = ({
input = String(),
i2d = Boolean(),
extraPodstates = Array(),
response = { queryresult: { pods: Array() } },
} = {}) => {
return `