(function () { "use strict"; window.CO_ControllerPrompts = { render: function (root, state) { var el = root.querySelector(".co-prompts"); if (!el) return; var prompts = CO_ControllerPrompts.getPrompts(state); el.innerHTML = prompts.map(function (p) { return ( '
' + '' + p.key + "" + "" + p.label + "" + "
" ); }).join(""); }, getPrompts: function (state) { if (state.joinOverlay) { if (state.joinOverlay.error) { return [ { key: "B", label: "Dismiss" }, { key: "A", label: "Dismiss" } ]; } return []; } if (state.activeTab === "direct-connect") { return [ { key: "A", label: "Connect" }, { key: "B", label: "Back" } ]; } if (state.focusZone === "filters") { var isReset = state.selectedFilterIndex === CO_Filters.FILTER_ROWS.length; return [ { key: "A", label: isReset ? "Reset" : "Change" }, { key: "B", label: "Back" } ]; } if (state.focusZone === "tabs") { return [ { key: "LB", label: "Prev Tab" }, { key: "RB", label: "Next Tab" }, { key: "B", label: "Back" } ]; } return [ { key: "A", label: "Join" }, { key: "X", label: "Refresh" }, { key: "Y", label: "Favorite" }, { key: "B", label: "Back" } ]; } }; })();