(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1553,2141,2494,2866,5022,6605,7423,7916,8580,8601,9840,9975],{10677:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var c=a(95155),r=a(12115);function o(){let[e,t]=(0,r.useState)([]),[a,o]=(0,r.useState)("");return(0,r.useEffect)(()=>{o(localStorage.getItem("madarx.activeProjectId")||""),fetch("/api/projects").then(e=>e.json()).then(e=>t(e.projects||[])).catch(()=>{})},[]),(0,c.jsx)("div",{className:"project-switcher","data-project-switcher":!0,children:(0,c.jsxs)("select",{value:a,onChange:e=>{var t;o(t=e.target.value),t?localStorage.setItem("madarx.activeProjectId",t):localStorage.removeItem("madarx.activeProjectId"),window.dispatchEvent(new CustomEvent("madarx:project-change",{detail:{project_id:t||null}}))},"aria-label":"Active project",children:[(0,c.jsx)("option",{value:"",children:"All projects"}),e.map(e=>(0,c.jsx)("option",{value:e.id,children:e.name},e.id))]})})}},96146:(e,t,a)=>{Promise.resolve().then(a.bind(a,10677))}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=96146)),_N_E=e.O()}]);